-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
51 lines (48 loc) · 1.33 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
version: "3"
services:
ms-demo-node:
container_name: ms-demo-node
labels:
- "traefik.backend=ms-demo-node"
- "traefik.frontend.rule=PathPrefixStrip: /demonode"
user: root # avoids ton of volume mounting headaches in dev mode.
build:
context: .
volumes:
- ./:/opt/app
# @see: http://jdlm.info/articles/2016/03/06/lessons-building-node-app-docker.html#the-node_modules-volume-trick
- /opt/app/node_modules
ports:
- 5501
expose:
- 5501
env_file:
- ./database.env
links:
- ms-demo-node-db
environment:
- NODE_ENV=development
- NODE_HOT_RELOAD=1
- NODE_LOGGER_GRANULARLEVELS=1
- NODE_CONFIG_DISABLE_FILE_WATCH="Y"
- PORT=5501
#command: nodemon -L -e js,coffee,jade,handlebars server.js
command: ./wait-for.sh ms-demo-node-db:3306 --timeout=240 -- ./start-after-migrations.sh
ms-demo-node-db:
container_name: ms-demo-node-db
image: mysql:8
# port mapping not needed for the app, but convenient in debugging
# to use some GUI tool (e.g. SequelPro) against the DB, on the host
## ports:
## - 5306:3306
ports:
- 3306
expose:
- 3306
env_file:
- ./database.env
volumes:
- ms_nb_example_db_data:/var/lib/mysql
restart: always
volumes:
ms_nb_example_db_data: