-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbackend_js.mongo.docker-compose.yml
118 lines (113 loc) · 2.51 KB
/
backend_js.mongo.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: "3.8"
services:
# ==================================================== BACKEND_JS ====================================================
# To be commented
#
backend-js:
# image
# container_name
container_name: backend_js_container
# build
build:
context: .
dockerfile: ./docker/backend_js.Dockerfile
# networks
networks:
- backend
- frontend
# volumes
# ports
ports:
- 5000:5000
# environment
environment:
- NODE_ENV=production
- APP_VERSION=1.0
# depends_on
depends_on:
# - mariadb
- mongo
# - postgres
# command
# entrypoint
# healthcheck
# configs
# secrets
# deploy
# restart
restart: unless-stopped
# ---------------------------------------------------- BACKEND_JS ----------------------------------------------------
# ==================================================== DB_MONGO ====================================================
# To be commented
#
#
mongo:
# image
image: mongo
# container_name
container_name: mongo_container
# build
# networks
networks:
- backend
# volumes
volumes:
- type: bind
source: ${MONGO_DATA_VOL}
target: /data/db
# ports
ports:
- ${MONGO_PORT}:27017
# environment
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_INITDB_ROOT_USERNAME}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_INITDB_ROOT_PASSWORD}
# depends_on
# command
# entrypoint
# healthcheck
healthcheck:
test: echo 'db.stats().ok' | mongo localhost:27017/test --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 40s
# configs
# secrets
# deploy
# restart
restart: unless-stopped
# ----------------------------------------------------
mongo-express:
# image
image: mongo-express
# container_name
container_name: mongo-express_container
# build
# networks
networks:
- backend
# volumes
# ports
ports:
- ${ME_PORT}:8081
# environment
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${ME_CONFIG_MONGODB_ADMINUSERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${ME_CONFIG_MONGODB_ADMINPASSWORD}
ME_CONFIG_MONGODB_URL: mongodb://${MONGO_INITDB_ROOT_USERNAME}:${MONGO_INITDB_ROOT_PASSWORD}@mongo:${MONGO_PORT}/
# depends_on
# command
# entrypoint
# healthcheck
# configs
# secrets
# deploy
# restart
restart: unless-stopped
# ---------------------------------------------------- DB_MONGO ----------------------------------------------------
networks:
frontend:
driver: bridge
backend:
driver: bridge