-
Notifications
You must be signed in to change notification settings - Fork 13
/
docker-compose.yaml
48 lines (45 loc) · 1.32 KB
/
docker-compose.yaml
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
version: "2"
# NOTE refer to the accompanying '.env' file in this folder to access
# environment variables which are passed through to docker-compose.yaml
# at run time
networks:
pretzel:
driver: bridge
services:
database: # mongo database
image: library/mongo # base image off dockerhub
environment:
- "MONGO_INITDB_ROOT_USERNAME=${DB_USER}"
- "MONGO_INITDB_ROOT_PASSWORD=${DB_PASS}"
# volumes:
# - ${DATA_DIR}:/data/db
expose:
- "${MONGO_DEFAULT_PORT}"
networks:
- pretzel
api: # node environment
depends_on:
- database
build:
context: .
dockerfile: ./scripts/Dockerfile
image: plantinformaticscollaboration/pretzel:latest # specifying name for built container
command: node /app/lb3app/server/server.js
environment:
- "API_HOST=${API_HOST}"
- "API_PORT_EXT=${API_PORT_EXT}"
- "DB_HOST=database"
- "DB_PORT=${MONGO_DEFAULT_PORT}"
- "DB_NAME=${DB_NAME}"
- "DB_USER=${DB_USER}"
- "DB_PASS=${DB_PASS}"
- "EMAIL_HOST=${EMAIL_HOST}"
- "EMAIL_PORT=${EMAIL_PORT}"
- "EMAIL_FROM=${EMAIL_FROM}"
- "EMAIL_VERIFY=${EMAIL_VERIFY}"
- "EMAIL_ADMIN=${EMAIL_ADMIN}"
ports:
# match ext / int ports for loopback
- "${API_PORT_EXT}:${API_PORT_EXT}"
networks:
- pretzel