forked from openchatai/OpenChat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
make.bat
49 lines (35 loc) · 1.61 KB
/
make.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
DOCKER_COMPOSE = docker-compose
BUILD_OPTS =
install:
@echo "=== Putting the services down (if already running) ==="
${DOCKER_COMPOSE} down --remove-orphans
@echo "=== Setting up Docker environment ==="
@echo "=== This will overwrite your .env files, you still have some time to abort ==="
@echo "=== Copying .env files ==="
copy /Y backend-server\.env.example backend-server\.env
copy /Y common.env llm-server\.env
${DOCKER_COMPOSE} build ${BUILD_OPTS}
${DOCKER_COMPOSE} up -d
@echo "=== Waiting for services to start (~20 seconds) ==="
@echo "=== Clearing backend server config cache ==="
${DOCKER_COMPOSE} exec backend-server php artisan config:cache
${DOCKER_COMPOSE} exec backend-server php artisan cache:clear
${DOCKER_COMPOSE} exec backend-server php artisan config:cache
@echo "=== Run backend server server migrations ==="
${DOCKER_COMPOSE} exec backend-server php artisan migrate --seed
@echo "=== Running backward compatibility scripts ==="
${DOCKER_COMPOSE} exec backend-server php artisan storage:link
${DOCKER_COMPOSE} exec backend-server php artisan prompt:fill
${DOCKER_COMPOSE} run -d backend-server php artisan queue:work --timeout=200
@echo "=== Installation completed ==="
@echo "=== 🔥🔥 You can now access the dashboard at -> http://localhost:8000 ==="
@echo "=== Enjoy! ==="
run-worker:
${DOCKER_COMPOSE} exec backend-server php artisan queue:work --timeout=200
db-setup:
${DOCKER_COMPOSE} exec backend-server php artisan migrate:fresh --seed
down:
${DOCKER_COMPOSE} down --remove-orphans
exec-backend-server:
${DOCKER_COMPOSE} exec backend-server bash
.PHONY: install down