-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
50 lines (50 loc) · 1.12 KB
/
docker-compose.yml
File metadata and controls
50 lines (50 loc) · 1.12 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
version: '3.9'
services:
frontend:
container_name: app_recipe_frontend
build: ./front-end
ports:
- 3000:3000
working_dir: /app-front-end
healthcheck:
test: ["CMD", "lsof", "-t", "-i:3000"]
timeout: 10s
retries: 5
backend:
container_name: app_recipe_backend
build: ./back-end
ports:
- 3001:3001
working_dir: /app-back-end
command: dev
volumes:
- ./back-end/src:/app-back-end/src
depends_on:
db:
condition: service_healthy
environment:
- APP_PORT=${APP_PORT}
- JWT_SECRET=${JWT_SECRET}
- DB_USER=${DB_USER}
- DB_PASS=${DB_PASS}
- DB_HOST=${DB_HOST}
- DB_PORT=${DB_PORT}
healthcheck:
test: ["CMD", "lsof", "-t", "-i:3001"]
timeout: 10s
retries: 5
db:
image: mysql:8.0.32
container_name: db
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=${DB_PASS}
- MYSQL_DATABASE=RECIPES_APP
restart: 'always'
healthcheck:
test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
timeout: 10s
retries: 5
cap_add:
- SYS_NICE