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