-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yaml
More file actions
55 lines (51 loc) · 1.05 KB
/
docker-compose.yaml
File metadata and controls
55 lines (51 loc) · 1.05 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
version: '3'
services:
node:
build:
context: ./node
dockerfile: Dockerfile
container_name: node
networks:
- node-network
restart: always
volumes:
- ./node:/usr/src/app
- /usr/src/app/node_modules
tty: true
depends_on:
db:
condition: service_healthy
nginx:
build:
context: ./nginx
dockerfile: Dockerfile
container_name: nginx
restart: always
ports:
- "8080:80"
networks:
- node-network
depends_on:
- node
db:
image: mysql:5.7
command: --innodb-use-native-aio=0
container_name: db
restart: always
tty: true
volumes:
- ./mysql:/var/lib/mysql
- ./init.sql:/docker-entrypoint-initdb.d/init.sql
environment:
- MYSQL_DATABASE=nodedb
- MYSQL_ROOT_PASSWORD="root"
networks:
- node-network
healthcheck:
test: ["CMD", "mysqladmin", "ping", "-h", "db","-uroot", "-proot"]
interval: 5s
timeout: 5s
retries: 5
networks:
node-network:
driver: bridge