Skip to content

Commit

Permalink
fix(docker): use separate postgres volume. Fixes MEMB-592
Browse files Browse the repository at this point in the history
  • Loading branch information
serge1peshcoff committed Aug 24, 2019
1 parent c7c7574 commit 537031b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
5 changes: 3 additions & 2 deletions config/index.js.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const config = {
host: process.env.DB_HOST || 'postgres-oms-discounts',
port: parseInt(process.env.DB_PORT, 10) || 5432,
username: process.env.USERNAME || 'postgres',
password: process.env.PASSWORD || 'postgres',
password: process.env.PG_PASSWORD || 'postgres',
database: process.env.DB_DATABASE || 'discounts'
},
core: {
Expand All @@ -27,7 +27,8 @@ const config = {
port: 8085,
postgres: {
host: 'localhost',
database: 'discounts-testing'
database: 'discounts-testing',
password: process.env.PG_PASSWORD || 'postgres',
},
bugsnagKey: 'CHANGEME'
}
Expand Down
7 changes: 4 additions & 3 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ services:
postgres-oms-discounts:
image: postgres:10
volumes:
- postgres:/var/lib/postgresql/data
- postgres-oms-discounts:/var/lib/postgresql/data
expose:
- "5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_PASSWORD: ${PW_POSTGRES}
oms-discounts:
build:
context: ./$PATH_OMS_DISCOUNTS/oms-discounts
Expand All @@ -25,6 +25,7 @@ services:
- "8084"
environment:
BUGSNAG_KEY: bbef84ab99c91665262f672ba6507a2d
PG_PASSWORD: ${PW_POSTGRES}
secrets:
- mail_user
- mail_password
Expand All @@ -40,7 +41,7 @@ services:


volumes:
postgres:
postgres-oms-discounts:
driver: "local"
oms-discounts-media:
driver: "local"
Expand Down

0 comments on commit 537031b

Please sign in to comment.