-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
41 lines (36 loc) · 1.01 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
version: "3.9"
services:
mongo:
image: mongo
restart: always
container_name: mongo-docker
environment:
MONGO_INITDB_ROOT_USERNAME: mongoadmin
MONGO_INITDB_ROOT_PASSWORD: mongoadmin
#MONGODB_AUTH_DATABASE: admin
ports:
- "27017:27017"
volumes:
- ./workspace:/workspace
- type: volume
source: mongodb_data_volume
target: /data/db
mongo-express:
image: mongo-express
container_name: mongo-express
restart: always
ports:
- "28081:8081"
environment:
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_BASICAUTH_USERNAME: admin
ME_CONFIG_BASICAUTH_PASSWORD: changeme
#ME_CONFIG_MONGODB_AUTH_DATABASE: admin
ME_CONFIG_MONGODB_ADMINUSERNAME: mongoadmin
ME_CONFIG_MONGODB_ADMINPASSWORD: mongoadmin
ME_CONFIG_MONGODB_URL: mongo://mongoadmin:mongoadmin@mongo:27017/
depends_on:
- mongo
volumes:
mongodb_data_volume:
driver: local