-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
60 lines (60 loc) · 1.36 KB
/
docker-compose.yml
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
version: '3.9'
services:
frontend:
container_name: app_frontend
build: ./front-end
ports:
- 3000:3000
working_dir: /app-frontend
volumes:
- ./front-end/src:/app-frontend/src
environment:
- VITE_JWT_SECRET=jwt_secret
depends_on:
backend:
condition: service_healthy
healthcheck:
test: ['CMD', 'lsof', '-t', '-i:3000']
timeout: 10s
retries: 5
backend:
container_name: app_backend
build: ./back-end
ports:
- 3001:3001
working_dir: /app-backend
command: npm run dev:compose
volumes:
- ./back-end/src:/app-backend/src
depends_on:
db:
condition: service_healthy
environment:
- API_PORT=3001
- JWT_SECRET=jwt_secret
- MYSQL_USER=root
- MYSQL_PASSWORD=123456
- HOSTNAME=db
- MYSQL_PORT=3306
- MYSQL_DB_NAME=schedule-app
- EVAL_ALWAYS_RESTORE_DEV_DB=true
- NODE_ENV=development
healthcheck:
test: ['CMD', 'lsof', '-t', '-i:3001']
timeout: 10s
retries: 5
db:
image: mysql:8.0.21
container_name: db
platform: linux/x86_64
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=123456
restart: 'always'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost']
timeout: 10s
retries: 5
cap_add:
- SYS_NICE