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