From e712007e9636a650b59ff277e4321f9014f9b6a5 Mon Sep 17 00:00:00 2001 From: FrozenSolid Date: Mon, 12 Feb 2024 14:13:02 -0700 Subject: [PATCH] add port and ssl options --- database.js | 8 ++++++++ docker-compose.yml | 2 ++ 2 files changed, 10 insertions(+) diff --git a/database.js b/database.js index beacca4..db4f733 100644 --- a/database.js +++ b/database.js @@ -11,7 +11,15 @@ const sequelize = new Sequelize( process.env.DATABASE_PASSWORD, { host: process.env.DATABASE_HOST, + port: process.env.DATABASE_PORT, dialect: 'postgres', + ssl: process.env.DATABASE_SSL, + dialectOptions: { + ssl: { + require: process.env.DATABASE_SSL, + rejectUnauthorized: false, + }, + }, benchmark: true, logging: true }, diff --git a/docker-compose.yml b/docker-compose.yml index 2b24a2d..8476b6b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,6 +40,8 @@ services: - DATABASE_USER=xsshunterexpress - DATABASE_PASSWORD=xsshunterexpress - DATABASE_HOST=postgresdb + - DATABASE_PORT=5432 + - DATABASE_SSL=false - NODE_ENV=production ports: - "80:80"