-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
40 lines (39 loc) · 1004 Bytes
/
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
# Use root/example as user/password credentials
version: '3.1'
services:
mongo:
container_name: mongodb
image: mongo:4.4.4-bionic
restart: always
ports:
- '27017:27017'
environment:
MONGO_INITDB_ROOT_USERNAME: root
MONGO_INITDB_ROOT_PASSWORD: example
MONGO_INITDB_DATABASE: mydb
volumes:
- ./mongo/init-mongo.js:/docker-entrypoint-initdb.d/init-mongo.js:ro
- ./mongo/db:/data/db
mongo-express:
image: mongo-express:0.54
restart: always
ports:
- 8081:8081
environment:
ME_CONFIG_MONGODB_ADMINUSERNAME: root
ME_CONFIG_MONGODB_ADMINPASSWORD: example
ME_CONFIG_BASICAUTH_USERNAME: expuser
ME_CONFIG_BASICAUTH_PASSWORD: exppw
ME_CONFIG_MONGODB_SERVER: mongodb
app:
container_name: app
restart: always
build: ./node-app
environment:
DB_USER_ID: dbuser
DB_USER_PW: dbpw
DB_NAME: mydb
DB_SERVER: mongodb
DB_PORT: 27017
ports:
- '80:3000'