konga
konga copied to clipboard
Patched sails-postgresql module to support >= postgres12
This patch should solve following issues #649 #646 #631 #487 #457

I made some changes to make it auto patched during npm postinstall.
Is this ever going to get merged?
Is this ever going to get merged?
@pedrovsn
Ditto. I hope this gets merged soon.
I also hope this gets merged soon @pantsel . I have run into a problem with postgres 14 on konga.
Is there an ETA on merging this ?
please merge at least this PR
@vichaos : How do you set that up? I checked our your PR branch, build the container but still run into the issue.
git checkout add-support-to-postgres12-or-newer
docker build -t konga .
docker run -it \
--network host \
-e "NODE_ENV=development" \
-e "TOKEN_SECRET=123456" \
-e "HOST=127.0.0.1" \
-e "PORT=1337" \
-e "DB_ADAPTER=postgres" \
-e "DB_HOST=$KONG_PG_HOST" \
-e "DB_PORT=$KONG_PG_PORT" \
-e "DB_USER=$KONG_PG_USER" \
-e "DB_DATABASE=konga2" \
-e "DB_PASSWORD=$KONG_PG_PASSWORD" \
-e "KONGA_HOOK_TIMEOUT=120000" \
--name konga \
konga
error: A hook (`orm`) failed to load!
error: error: column r.consrc does not exist
at Connection.parseE (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:539:11)
at Connection.parseMessage (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:366:17)
at Socket.<anonymous> (/app/node_modules/sails-postgresql/node_modules/pg/lib/connection.js:105:22)
at Socket.emit (events.js:310:20)
at Socket.EventEmitter.emit (domain.js:482:12)
at addChunk (_stream_readable.js:286:12)
at readableAddChunk (_stream_readable.js:268:9)
at Socket.Readable.push (_stream_readable.js:209:10)
at TCP.onStreamRead (internal/stream_base_commons.js:186:23)
/app/node_modules/sails-postgresql/lib/adapter.js:158
var collection = connectionObject.collections[table];
^
TypeError: Cannot read property 'collections' of undefined
@oborchers, Please take a look at the image I have provided on the first comment. I have shown how to get konga working with postgres14.
docker run -it \
--network host \
-e "NODE_ENV=development" \
-e "TOKEN_SECRET=123456" \
-e "HOST=127.0.0.1" \
-e "PORT=1337" \
-e "DB_ADAPTER=postgres" \
-e "DB_HOST=$KONG_PG_HOST" \
-e "DB_PORT=$KONG_PG_PORT" \
-e "DB_USER=$KONG_PG_USER" \
-e "DB_DATABASE=konga2" \
-e "DB_PASSWORD=$KONG_PG_PASSWORD" \
-e "KONGA_HOOK_TIMEOUT=120000" \
-e "DB_IS_PG12_OR_NEWER=true" \ # <-------- this variable is missing
--name konga \
konga
P.S. I don't remember whether konga
supports SCRAM-SHA-256 password_encryption_hash or not but it supports MD5 for sure. So, if it only supports MD5 just follow this SCRAM-SHA-256_to_MD5 guide


@vichaos it works nicely! Can I give you a coffee?
Hi, any update regarding the merge?
@vichaos Could you push the image in https://hub.docker.com/?
any update?
worked nicely with postgres 13.7 :+1:
I build get this errors
/usr/local/lib/node_modules/patch-package/node_modules/yaml/dist/compose/composer.js:33
if (prelude[i + 1]?.[0] !== '#')
^
SyntaxError: Unexpected token '.'
at wrapSafe (internal/modules/cjs/loader.js:1047:16)
at Module._compile (internal/modules/cjs/loader.js:1097:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
at Module.load (internal/modules/cjs/loader.js:977:32)
at Function.Module._load (internal/modules/cjs/loader.js:877:14)
at Module.require (internal/modules/cjs/loader.js:1019:19)
at require (internal/modules/cjs/helpers.js:77:18)
at Object.<anonymous> (/usr/local/lib/node_modules/patch-package/node_modules/yaml/dist/index.js:3:16)
at Module._compile (internal/modules/cjs/loader.js:1133:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1153:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `bower --allow-root install && patch-package`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2023-07-27T07_09_26_624Z-debug.log
SCRAM is very important:
- https://github.com/scram-sasl/info/issues/1