-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose-db.yml
75 lines (67 loc) · 1.69 KB
/
docker-compose-db.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
version: "3"
services:
app_db:
image: bitnami/mongodb:4.2.0
container_name: app_db
ports:
- "27017:27017"
volumes:
- app_db:/bitnami/mongodb
restart: unless-stopped
environment:
- MONGODB_ROOT_USER=$MONGO_APP_DB_USERNAME
- MONGODB_ROOT_PASSWORD=$MONGO_APP_DB_PASSWORD
env_file:
- .env
networks:
- dhruva-network
log_db:
image: bitnami/mongodb:4.2.0
container_name: log_db
ports:
- "27018:27017"
volumes:
- log_db:/bitnami/mongodb
restart: unless-stopped
environment:
- MONGODB_ROOT_USER=$MONGO_LOG_DB_USERNAME
- MONGODB_ROOT_PASSWORD=$MONGO_LOG_DB_PASSWORD
env_file:
- .env
networks:
- dhruva-network
redis:
image: redis:latest
container_name: redis
ports:
- "6379:6379"
volumes:
- redis:/data
command: redis-server --save 20 1 --loglevel warning
restart: unless-stopped
networks:
- dhruva-network
mongo_admin:
image: adicom/admin-mongo
container_name: mongo_admin
ports:
- "1234:1234"
volumes:
- mongo_admin:/app
restart: unless-stopped
command: "/bin/sh -c 'echo $$CONFIG > config/config.json ; echo $$APP > config/app.json ; node app.js'"
environment:
- APP={"app":{"password":"$ADMIN_MONGO_PASSWORD"}}
- CONFIG={"connections":{"APP":{"connection_string":"$APP_DB_CONNECTION_STRING","connection_options":{}}, "LOG":{"connection_string":"$LOG_DB_CONNECTION_STRING","connection_options":{}}}}
env_file:
- .env
networks:
- dhruva-network
volumes:
app_db: {}
log_db: {}
redis: {}
mongo_admin: {}
networks:
dhruva-network:
name: dhruva-network