-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
59 lines (54 loc) · 976 Bytes
/
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
version: '3.5'
services:
api-service:
build: .
hostname: api-service
command: npm run start:prod
volumes:
- .:/var/www/api
env_file:
- .env
ports:
- "8000:8000"
networks:
- backend
depends_on:
- database
api-debug:
build: .
hostname: api-service
command: npm run start:debug
volumes:
- .:/var/www/api
env_file:
- .env
ports:
- "8000:8000"
- "8080:8080"
networks:
- backend
depends_on:
- database
database:
container_name: mysql
image: mysql
restart: always
env_file:
- .env
environment:
MYSQL_ROOT_PASSWORD: $MYSQL_ROOT_PASSWORD
MYSQL_DATABASE: $MYSQL_DATABASE
ports:
- "3306:3306"
volumes:
- db-config:/etc/mysql
- db-data:/var/lib/mysql
networks:
- backend
networks:
backend:
name: todo-api-service
driver: bridge
volumes:
db-config:
db-data: