-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathdocker-compose.yml
executable file
·50 lines (48 loc) · 1.33 KB
/
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
services:
mongo:
container_name: cc-mongo-dev
image: mongo
networks:
- cubingcontests-dev
ports:
- 127.0.0.1:27017:27017
volumes:
- cubingcontests-db:/data/db:rw
- cubingcontests-configdb:/data/configdb:rw
- mongo-init:/docker-entrypoint-initdb.d:ro
environment:
- MONGO_INITDB_ROOT_USERNAME=$MONGO_ADMIN_USERNAME
- MONGO_INITDB_ROOT_PASSWORD=$MONGO_ADMIN_PASSWORD
- MONGO_DEV_USERNAME=$MONGO_DEV_USERNAME
- MONGO_DEV_PASSWORD=$MONGO_DEV_PASSWORD
restart: unless-stopped
mongo-express:
container_name: cc-mongo-express
image: mongo-express
networks:
- cubingcontests-dev
ports:
- 127.0.0.1:8081:8081
environment:
- ME_CONFIG_MONGODB_SERVER=cc-mongo-dev
- ME_CONFIG_MONGODB_ADMINUSERNAME=$MONGO_ADMIN_USERNAME
- ME_CONFIG_MONGODB_ADMINPASSWORD=$MONGO_ADMIN_PASSWORD
- ME_CONFIG_BASICAUTH_USERNAME=admin
- ME_CONFIG_BASICAUTH_PASSWORD=cc
depends_on:
- mongo
restart: unless-stopped
networks:
cubingcontests-dev:
volumes:
cubingcontests-db:
# Tells docker to create the storage for the volume on the local file system
driver: local
cubingcontests-configdb:
driver: local
mongo-init:
driver: local
driver_opts:
type: none
o: bind
device: ./mongo_init