DevOps - fix running k8s pod with job-xsweet container
From https://gitlab.coko.foundation/kotahi/kotahi/-/blob/main/docker-compose.production.elife.yml#L54-70 created deployment https://gitlab.coko.foundation/kotahi/endava-infra/-/blob/master/k8s/elife-kotahi/templates/job-xsweet-deployment.yaml
Need to fix error:
(node:7) UnhandledPromiseRejectionWarning: Error: connect ECONNREFUSED 127.0.0.1:5432
at Object.raw (/home/node/node_modules/knex/lib/util/make-knex.js:114:30)
at Function.value (/home/node/node_modules/knex/lib/util/make-knex.js:90:29)
at Object.executeSql (/home/node/node_modules/pubsweet-server/src/jobs/index.js:19:17)
at Contractor.isInstalled (/home/node/node_modules/pg-boss/src/contractor.js:31:34)
at Contractor.start (/home/node/node_modules/pg-boss/src/contractor.js:36:34)
at PgBoss.start (/home/node/node_modules/pg-boss/src/index.js:91:27)
at start (/home/node/node_modules/pubsweet-server/src/jobs/index.js:57:14)
at handleJobs (/home/node/src/xsweet.js:114:26)
at Object.<anonymous> (/home/node/src/xsweet.js:121:1)
at Module._compile (internal/modules/cjs/loader.js:816:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:827:10)
at Module.load (internal/modules/cjs/loader.js:685:32)
at Function.Module._load (internal/modules/cjs/loader.js:620:12)
(node:7) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch
block, or by rejecting a promise which was not handled with .catch(). (rejection id: 5)
(node:7) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.