-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
49 lines (46 loc) · 1.14 KB
/
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
version: '3'
services:
db:
image: mysql:5.7
command: --innodb-use-native-aio=0
container_name: db
restart: always
tty: true
volumes:
- ./setup.sql:/docker-entrypoint-initdb.d/setup.sql
- ./mysql:/var/lib/mysql
environment:
- MYSQL_DATABASE=nodedb
- MYSQL_ROOT_PASSWORD=root
networks:
- nodenet
node:
build:
context: ./node
dockerfile: Dockerfile.prod
image: wsanada/node:prod
container_name: node
entrypoint: dockerize -wait tcp://db:3306 -timeout 60s docker-entrypoint.sh
command: node index.js
tty: true
networks:
- nodenet
# ports:
# - "3000:3000"
depends_on:
- db
nginx:
build:
context: ./nginx
dockerfile: Dockerfile.prod
image: wsanada/nginx:prod
container_name: nginx
networks:
- nodenet
ports:
- "8080:8080"
depends_on:
- node
networks:
nodenet:
driver: bridge