forked from OpenEnergyDashboard/OED
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
63 lines (62 loc) · 2.42 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
# *
# * This Source Code Form is subject to the terms of the Mozilla Public
# * License, v. 2.0. If a copy of the MPL was not distributed with this
# * file, You can obtain one at http://mozilla.org/MPL/2.0/.
# *
version: "2"
services:
# Database service. It's PostgreSQL, see the
# Dockerfile in ./database
database:
build: ./containers/database/
environment:
# Custom PGDATA per recommendations from official Docker page
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- ./postgres-data:/var/lib/postgresql/data/pgdata
# Web service runs Node
web:
# Configuration variables for the app.
environment:
- OED_PRODUCTION=no
- OED_SERVER_PORT=3000
- OED_DB_USER=oed
- OED_DB_DATABASE=oed
- OED_DB_TEST_DATABASE=oed_testing
- OED_DB_PASSWORD=opened
- OED_DB_HOST=database # Docker will set this hostname
- OED_DB_PORT=5432
- OED_TOKEN_SECRET=?
- OED_LOG_FILE=log.txt
- OED_MAIL_METHOD=none # Method of sending mail. Supports "gmail", "mailgun", "none". Case insensitive.
- OED_MAIL_CREDENTIAL=credential # Set the email password here
- [email protected] # Set the destination address here
- OED_MAIL_ORG=My Organization Name # Org name for mail formatting
# If in a subdirectory, set it here
# - OED_SUBDIR=/subdir/
# Set the correct build environment.
build:
context: ./
dockerfile: ./containers/web/Dockerfile
# Link to the database so the app can persist data
links:
- database
# Load the source code into the container.
# Using a volume allows autorebuild to work.
volumes:
- ./:/usr/src/app
# Map the default port.
ports:
- "3000:3000"
- "9229:9229" # Debug port
# For production you might want something like:
# - "80:3000"
# and disable the debug port
# Don't bring this up without the DB
depends_on:
- database
# Lets docker-compose up work right
command: ["bash", "./src/scripts/installOED.sh"]
# Reverse proxy, for testing