Skip to content

Commit

Permalink
feat: standardise passwords; improve deployability
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxbandit committed May 1, 2019
1 parent ed873af commit 4a098f0
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion 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-events',
port: parseInt(process.env.DB_PORT, 10) || 5432,
username: process.env.USERNAME || 'postgres',
password: process.env.PASSWORD || 'postgres',
password: process.env.PASSWORD || '5ecr3t',
database: process.env.DB_DATABASE || 'events'
},
core: {
Expand Down
6 changes: 6 additions & 0 deletions docker/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
PATH_OMS_EVENTS=./
BASE_URL=localhost.test
PW_POSTGRES=postgres

#TODO: this file will be copied and some (3) variables
#injected by the top-level .env file: BASE_URL, NODE_ENV, PW_POSTGRES
15 changes: 7 additions & 8 deletions docker/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,18 @@ version: '3.2'
### mongodb Container #######################################
services:
postgres-oms-events:
restart: always
image: postgres:10
volumes:
- postgres-events:/var/lib/postgresql/data
expose:
- "5432"
- 5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_PASSWORD: ${PW_POSTGRES}

oms-events:
restart: on-failure
build:
context: ./$PATH_OMS_EVENTS/oms-events
dockerfile: ./Dockerfile.dev
Expand All @@ -23,7 +26,7 @@ services:
links:
- postgres-oms-events
expose:
- "8084"
- 8084
environment:
BUGSNAG_KEY: 6f6a7c00507fceca0818c48405dbd2a6
secrets:
Expand All @@ -32,13 +35,9 @@ services:
labels:
- "traefik.backend=oms-events"
- "traefik.port=8084"
- "traefik.frontend.rule=HostRegexp:{domain:[a-z0-9.]+};PathPrefix:/services/oms-events/api;PathPrefixStrip:/services/oms-events/api"
- "traefik.frontend.rule=PathPrefix:/services/oms-events/api;PathPrefixStrip:/services/oms-events/api"
- "traefik.frontend.priority=110"
- "traefik.enable=true"
- "registry.categories=(events, 10);(notifications, 10)"
- "registry.servicename=oms-events"



volumes:
postgres-events:
Expand Down

0 comments on commit 4a098f0

Please sign in to comment.