Skip to content

Commit

Permalink
Merge pull request #1908 from opengb/develop
Browse files Browse the repository at this point in the history
Allows env to control postgres port in SEED docker image
  • Loading branch information
nllong committed Jun 26, 2019
2 parents 99ba21f + cbb1e2e commit 4762cb4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions config/settings/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
from config.settings.common import * # noqa

# Gather all the settings from the docker environment variables
ENV_VARS = ['POSTGRES_DB', 'POSTGRES_USER', 'POSTGRES_PASSWORD', ]
ENV_VARS = ['POSTGRES_DB', 'POSTGRES_PORT', 'POSTGRES_USER', 'POSTGRES_PASSWORD', ]

# The optional vars will set the SERVER_EMAIL information as needed
OPTIONAL_ENV_VARS = ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'AWS_SES_REGION_NAME',
Expand Down Expand Up @@ -47,7 +47,7 @@
'USER': POSTGRES_USER,
'PASSWORD': POSTGRES_PASSWORD,
'HOST': "db-postgres",
'PORT': 5432,
'PORT': POSTGRES_PORT,
}
}

Expand Down
3 changes: 3 additions & 0 deletions docker-compose.local.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Docker Compose for deployment using a local registry.
# Must set the following environment variables
# POSTGRES_DB
# POSTGRES_PORT
# POSTGRES_USER
# POSTGRES_PASSWORD
# SEED_ADMIN_USER
Expand Down Expand Up @@ -50,6 +51,7 @@ services:
- AWS_SES_REGION_ENDPOINT
- SERVER_EMAIL
- POSTGRES_DB
- POSTGRES_PORT=5432
- POSTGRES_USER
- POSTGRES_PASSWORD
# - REDIS_PASSWORD
Expand Down Expand Up @@ -80,6 +82,7 @@ services:
image: 127.0.0.1:5000/seed
environment:
- POSTGRES_DB
- POSTGRES_PORT=5432
- POSTGRES_USER
- POSTGRES_PASSWORD
- SECRET_KEY
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ services:
- AWS_SES_REGION_ENDPOINT
- SERVER_EMAIL
- POSTGRES_DB=seed
- POSTGRES_PORT=5432
- POSTGRES_USER=seed
- POSTGRES_PASSWORD=super-secret-password
# - REDIS_PASSWORD=optional-need-to-configure-redis
Expand All @@ -53,6 +54,7 @@ services:
command: /seed/docker/start_celery_docker.sh
environment:
- POSTGRES_DB=seed
- POSTGRES_PORT=5432
- POSTGRES_USER=seed
- POSTGRES_PASSWORD=super-secret-password
# - REDIS_PASSWORD=optional-need-to-configure-redis
Expand Down

0 comments on commit 4762cb4

Please sign in to comment.