-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
53 lines (48 loc) · 969 Bytes
/
docker-compose.yaml
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
version: '3'
services:
app:
build:
context: ./node
networks:
- nodenetwork
volumes:
- ./node:/usr/src/app
- /usr/src/app/node_modules
tty: true
container_name: app
ports:
- "3000:3000"
depends_on:
db:
condition: service_healthy
db:
image: mysql:5.7
command: --innodb-use-native-aio=0
container_name: db
restart: always
tty: true
volumes:
- ./mysql:/var/lib/mysql
environment:
- MYSQL_DATABASE=nodedb
- MYSQL_ROOT_PASSWORD=root
networks:
- nodenetwork
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "localhost", "-u", "root", "-p$MYSQL_ROOT_PASSWORD"]
interval: 5s
timeout: 10s
retries: 3
nginx:
build:
context: ./nginx
container_name: nginx
networks:
- nodenetwork
ports:
- "8080:80"
depends_on:
- app
networks:
nodenetwork:
driver: bridge