-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
42 lines (37 loc) · 1.09 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
# version: '3'
services:
api:
depends_on:
- admin #checks for mongo database container being started
- redis
build: . #building this vs using the mongo docker
environment:
# MONGO_PASSWORD: ${MONGO_PASSWORD} #need to add base user onto mongodb initdb below
# MONGO_USER: ${MONGO_USER}
MONGO_ROOT_USER: ${MONGO_ROOT_USER}
MONGO_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_HOST: ${MONGO_HOST} #
MONGO_DB_NAME: ${MONGO_DB_NAME}
ports:
- 8000:8000
admin:
image: mongo
environment:
MONGO_INITDB_ROOT_USERNAME: ${MONGO_ROOT_USER}
MONGO_INITDB_ROOT_PASSWORD: ${MONGO_ROOT_PASSWORD}
MONGO_INITDB_DATABASE: ${MONGO_DB_NAME}
ports:
- 27017:27017 #map external port calls to internal port. ensures "going where we expect"
redis:
image: redis:latest
restart: always
ports:
- ${REDIS_PORT}:${REDIS_PORT}
# Enviroment:
# initdb:
# depends_on:
# - tarpaulin
# restart: on-failure
# build: . #use dockerfile to build image
# command: [ "node", "initDb.js" ]
# # enviroment: