-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.skeleton.yml
30 lines (28 loc) · 1.1 KB
/
docker-compose.skeleton.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
version: '3.2'
services:
#================================================================================================
# MONGODB
#================================================================================================
mongodb:
restart: always
build:
context: .
ports:
- "${MONGO_PORT}:27017"
volumes:
- /etc/localtime:/etc/localtime:ro
- ${CONFIG_MONGODB}:/etc/mongodb.conf
- ${DATABASE_MONGODB}/db:/data/db # volume for data
- ${DATABASE_MONGODB}/configdb:/data/configdb # volume for config
- ${DATABASE_MONGODB}:/var/lib/mongodb
- ${LOG_MONGODB}:/var/log/mongodb/mongod.log # log mongodb
environment:
- MONGO_VERSION=${MONGO_VERSION}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_HOST=${MONGO_INITDB_ROOT_HOST}
- MONGO_DATABASE=${MONGO_DATABASE}
- MONGO_USER=${MONGO_USER}
- MONGO_PASSWORD=${MONGO_PASSWORD}
# command: >
# /usr/bin/mongod --config /etc/mongodb.conf