-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.dev.yaml
38 lines (36 loc) · 1.07 KB
/
docker-compose.dev.yaml
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
version: '3.3'
services:
db:
image: mongo:5.0.6
ports:
- '$MONGO_PORT_EXT:27017'
volumes:
- './mongo-init.js:/docker-entrypoint-initdb.d/mongo-init.js:ro'
- 'srvexo-data-db:/data/db'
environment:
MONGO_INITDB_ROOT_USERNAME: $MONGO_ROOT_USER
MONGO_INITDB_ROOT_PASSWORD: $MONGO_ROOT_PWD
MONGO_INITDB_USER: $MONGO_APP_USER
MONGO_INITDB_PASSWORD: $MONGO_APP_PWD
MONGO_INITDB_DATABASE: $MONGO_DB_NAME
healthcheck:
test: echo 'db.runCommand({serverStatus:1}).ok' | mongosh -u $MONGO_ROOT_USER -p $MONGO_ROOT_PWD --quiet
interval: 10s
timeout: 10s
retries: 5
start_period: 20s
db-gui:
image: mongo-express:latest
depends_on:
db:
condition: service_healthy
ports:
- '$MONGO_GUI_PORT_EXT:8081'
environment:
ME_CONFIG_MONGODB_SERVER: db
ME_CONFIG_MONGODB_PORT: 27017
ME_CONFIG_MONGODB_AUTH_USERNAME: $MONGO_ROOT_USER
ME_CONFIG_MONGODB_AUTH_PASSWORD: $MONGO_ROOT_PWD
ME_CONFIG_MONGODB_ENABLE_ADMIN: 'true'
volumes:
srvexo-data-db: