-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
55 lines (51 loc) · 1.06 KB
/
docker-compose.yml
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
version: '3'
services:
app:
build:
context: ./node
dockerfile: ./Dockerfile
image: fercele/fcnode:desafio1
container_name: app
networks:
- node-network
volumes:
- /usr/src/app/node_modules
- ./node:/usr/src/app
tty: true
# ports:
# - 3000:3000
depends_on:
- db
entrypoint: wait-for db:3306 -t 40 -- node index.js
#command: tail -f /dev/null
db:
build:
context: ./db
dockerfile: ./Dockerfile
image: fercele/fcmysql:desafio1
command: --innodb-use-native-aio=0
container_name: db
restart: always
tty: true
volumes:
- ./db/mysql:/var/lib/mysql
environment:
- MYSQL_DATABASE=nodedb
- MYSQL_ROOT_PASSWORD=root
networks:
- node-network
nginx:
image: fercele/fcnginx:desafio1
container_name: nginx
build:
context: ./nginx
dockerfile: ./Dockerfile
volumes:
- ./nginx/logs:/var/log/nginx
ports:
- 8080:80
networks:
- node-network
networks:
node-network:
driver: bridge