-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcompose.yaml
More file actions
35 lines (29 loc) · 775 Bytes
/
compose.yaml
File metadata and controls
35 lines (29 loc) · 775 Bytes
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
version: '3.1'
services:
mongo:
image: mongo
restart: always
environment:
MONGO_INITDB_ROOT_USERNAME: ${ADMIN_USERNAME} # creates a new user
MONGO_INITDB_ROOT_PASSWORD: ${ADMIN_PASSWORD} # sets users password
volumes:
- mongo-data:/data/db #default path where mongodb stores its data
mongo-express:
image: mongo-express
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: ${ADMIN_USERNAME}
ME_CONFIG_MONGODB_ADMINPASSWORD: ${ADMIN_PASSWORD}
ME_CONFIG_MONGODB_SERVER: mongo
ME_CONFIG_MONGODB_URL: mongodb://mongo:27017"
app:
build: .
ports:
- "8080:8080"
container_name: app
restart: always
volumes:
mongo-data:
driver: local