-
Notifications
You must be signed in to change notification settings - Fork 4
/
compose.yml
50 lines (50 loc) · 1.13 KB
/
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
version: '3'
services:
express-app:
build:
args:
- NODE_ENV=development
context: express-app
target: development
environment:
- DATABASE_DB=surveyjs
- DATABASE_USER=admin
- DATABASE_PASSWORD=/run/secrets/db-password
- DATABASE_HOST=mongo
- NODE_ENV=development
ports:
- 9080:3000
secrets:
- db-password
volumes:
- ./express-app:/code/express-app
- ./public:/code/public
networks:
- surveyjs-net
depends_on:
- mongo
mongo:
build:
context: mongo
secrets:
- db-password
environment:
- MONGO_INITDB_ROOT_USERNAME=admin
# - MONGO_INITDB_ROOT_PASSWORD=123456
- MONGO_INITDB_ROOT_PASSWORD_FILE=/run/secrets/db-password
- MONGO_INITDB_DATABASE=surveyjs
ports:
- '27017:27017'
volumes:
- ./mongo/entrypoint:/docker-entrypoint-initdb.d
- ./mongo/data:/data/db
- ./mongo/config:/data/configdb
networks:
- surveyjs-net
restart: unless-stopped
networks:
surveyjs-net:
driver: bridge
secrets:
db-password:
file: ./mongo/password.txt