-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (65 loc) · 2.34 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
version: "3.7"
services:
db-mongo:
container_name: ocmdata_mongodb
env_file: ./config/environments/local.env # CHANGE MANUALLY BY ENV?
environment:
- MONGO_INITDB_DATABASE=${DB_NAME}
- MONGO_INITDB_ROOT_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
# the right hand side are loaded from .env
image: mongo:${DB_VERSION} # now using separate Dockerfile to import tdata
restart: always
networks:
- netty
ports:
- "27017:27017"
volumes:
# Can't do this on Docker for Mac - see Caveats: Where to Store Data [https://hub.docker.com/_/mongo]
#- ./mongo/data:/data/db #Helps to store MongoDB data in `./mongo/data`
# copies over the seed data into mongo container to initialize users and database
- ./docker-entrypoint-initdb.d/seed.js:/docker-entrypoint-initdb.d/seed.js:ro
- ./docker-entrypoint-initdb.d/poi.json:/docker-entrypoint-initdb.d/poi.json:ro
- ./docker-entrypoint-initdb.d/poi.schema.json:/docker-entrypoint-initdb.d/poi.schema.json:ro
- ./docker-entrypoint-initdb.d/reference.json:/docker-entrypoint-initdb.d/reference.json:ro
db-mongo-admin:
container_name: ocmdata_mongoadmin
image: mongo-express
environment:
- ME_CONFIG_MONGODB_SERVER=db-mongo
- ME_CONFIG_MONGODB_ADMINUSERNAME=${MONGO_INITDB_ROOT_USERNAME}
- ME_CONFIG_MONGODB_ADMINPASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
- ME_CONFIG_BASICAUTH_USERNAME=${MONGO_INITDB_ROOT_USERNAME}
- ME_CONFIG_BASICAUTH_PASSWORD=${MONGO_INITDB_ROOT_PASSWORD}
ports:
- "8081:8081"
networks:
- netty
depends_on:
- db-mongo
# main:
# # image is provided by docker build of local app using Dockerfile
# container_name: ocmdata_nest
# restart: always
# build:
# context: .
# target: development
# volumes:
# - .:/usr/src/app
# - /usr/src/app/dist
# - /usr/src/app/node_modules
# ports:
# - 3400:3000 # DON'T CONFLICT WITH MAIN PROTEUS APP LOCALLY
# - 9229:9229 # FOR DEBUG
# command: npm run start:debug
# env_file: ./config/environments/local.env # CHANGE MANUALLY BY ENV?
# networks:
# - netty
# depends_on:
# - db-mongo
# logging:
# options:
# max-size: "10m"
# max-file: "3"
networks:
netty: