From e371aa4c0f30cd7133b7a9b255f6abda27195f96 Mon Sep 17 00:00:00 2001 From: John Craft Date: Tue, 24 Oct 2023 14:09:43 -0700 Subject: [PATCH] Cleanup env vars --- docker-compose.yml | 4 ++-- users-api/src/config/config.js | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index ae361ae..54f03d7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: DB_PASSWORD: ${DB_PASSWORD:-dMVZFeBWLOzYRV71} #It is strongly recommended to provide DB_PASSWORD in the environment rather than use this default. POSTGRES_DB: "postgres" DB_HOST: "users-db" - LOAD_DATA: "False" + LOAD_DATA: "True" ports: - 8080:8080 depends_on: @@ -33,6 +33,6 @@ services: POSTGRES_PASSWORD: ${DB_PASSWORD:-dMVZFeBWLOzYRV71} POSTGRES_DB: "postgres" DB_BACKUP_URL: "https://storage.googleapis.com/anonymize-db-backups/us-west1/backup.sql" - RESTORE_FROM_BACKUP: "True" + RESTORE_FROM_BACKUP: "False" ports: - 5432:5432 diff --git a/users-api/src/config/config.js b/users-api/src/config/config.js index 2fddc3e..144a91d 100644 --- a/users-api/src/config/config.js +++ b/users-api/src/config/config.js @@ -1,9 +1,11 @@ +require('dotenv').config(); + module.exports = { development: { username: process.env.DB_USERNAME, password: process.env.POSTGRES_PASSWORD, database: process.env.POSTGRES_DB, - host: 'localhost', // process.env.DB_HOST || + host: process.env.DB_HOST || 'localhost', dialect: 'postgres', }, };