-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
70 lines (67 loc) · 1.46 KB
/
Copy pathcompose.yaml
File metadata and controls
70 lines (67 loc) · 1.46 KB
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
services:
backend:
build:
context: ./apps/server
ports:
- "3000:3000"
env_file:
- ./apps/server/.env
restart: always
networks:
- chatassistant
command: >
sh -c "npx prisma generate && npm run start"
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:3000/check || exit 1"]
interval: 10s
timeout: 5s
retries: 5
start_period: 30s
frontend:
build:
context: ./apps/frontend
dockerfile: Dockerfile
args:
VITE_BACKEND_URL: /api
ports:
- "8080:8080"
restart: always
dns:
- 8.8.8.8
- 9.9.9.9
environment:
- VITE_BACKEND_URL=/api
networks:
- chatassistant
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:8080/Login || exit 1"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
nginx:
image: nginx:alpine
ports:
- "80:80"
volumes:
- ./nginx/nginx.conf:/etc/nginx/nginx.conf
restart: always
networks:
- chatassistant
depends_on:
backend:
condition: service_healthy
frontend:
condition: service_healthy
healthcheck:
test: ["CMD-SHELL", "curl --fail http://localhost:80/Login || exit 1"]
interval: 1m30s
timeout: 30s
retries: 5
start_period: 30s
networks:
chatassistant:
driver: bridge