-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
45 lines (41 loc) · 979 Bytes
/
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
services:
app:
image: lvsena/node-webapp
build: ./app
entrypoint: wait-for db:3306 --timeout=180 -- npm run start
volumes:
- ${PWD}/app/src/app.js:/home/node/app/app.js
networks:
- webapp_net
- back_network
depends_on: ["db", "proxy"]
db:
image: mysql:5.7
command: ["--innodb-use-native-aio=0", "--max-allowed-packet=67108864"]
platform: linux/amd64
restart: always
volumes:
- ${PWD}/mysql/data/:/var/lib/mysql
- ${PWD}/mysql/initdb/:/docker-entrypoint-initdb.d/
ports:
- 3306:3306
environment:
- MYSQL_ROOT_PASSWORD=root
- MYSQL_DATABASE=db
networks:
- back_network
proxy:
image: nginx:latest
container_name: nginx
restart: always
volumes:
- ${PWD}/nginx/default.conf:/etc/nginx/conf.d/default.conf
ports:
- 8080:80
networks:
- webapp_net
networks:
webapp_net:
driver: bridge
back_network:
driver: bridge