From 7321e9476c3bd1aa272c12bf3a07c240e04b707a Mon Sep 17 00:00:00 2001 From: Jure Triglav <juretriglav@gmail.com> Date: Thu, 11 Mar 2021 01:57:58 +0100 Subject: [PATCH] ci: ignore postgres port environment variable due to external bug --- config/custom-environment-variables.js | 5 ++++- server/app.js | 2 -- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/config/custom-environment-variables.js b/config/custom-environment-variables.js index 78100cc353..4dccdd862b 100644 --- a/config/custom-environment-variables.js +++ b/config/custom-environment-variables.js @@ -16,7 +16,10 @@ module.exports = { secret: 'PUBSWEET_SECRET', db: { host: 'POSTGRES_HOST', - port: 'POSTGRES_PORT', + // TODO: The port variable actually gets set to e.g. tcp://172.0.2.1:5321 + // by GitLab's CI - this a bug in their code. + // Resulting in: RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received NaN. + // port: 'POSTGRES_PORT', database: 'POSTGRES_DB', user: 'POSTGRES_USER', password: 'POSTGRES_PASSWORD', diff --git a/server/app.js b/server/app.js index 5098c07124..8a76aa0af6 100644 --- a/server/app.js +++ b/server/app.js @@ -4,8 +4,6 @@ const dotenvPath = path.resolve(`.env.${process.env.NODE_ENV || 'development'}`) require('dotenv').config({ path: dotenvPath }) const config = require('config') -console.log('CONFIG', config) -console.log('ENV', process.env) const express = require('express') const morgan = require('morgan') const helmet = require('helmet') -- GitLab