I am trying to use a managed PostgreSQL database at DigitalOcean for my instance of NodeBB. I have created a config.json file that looks like this:
{
"url": "http://nodebb.local",
"secret": "xxxx",
"database": "postgres",
"port": [4567],
"postgres": {
"host": "xxxxx.b.db.ondigitalocean.com",
"port": 25061,
"username": "nodebb",
"password": "xxxxxxx",
"database": "nodebb-pool",
"ssl": true
}
}
and am trying to build an image using this Dockerfile:
FROM nodebb/docker:latest
WORKDIR /usr/src/app
COPY config.json config.json
ENV NODE_TLS_REJECT_UNAUTHORIZED=0
RUN node ./nodebb build
VOLUME /usr/src/app/public/uploads
CMD exec node ./nodebb start
on the node ./nodebb build
step I get the following error(s):
2021-02-21T01:28:50.763Z [4567/7] - error: [build] Encountered error preparing for build
error: prepared statement "getObjectFields" already exists
at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:278:15)
at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
at TLSSocket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:10:42)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
2021-02-21T01:28:50.763Z [4567/7] - error: [build] Encountered error during build step
error: prepared statement "getObjectFields" already exists
at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:278:15)
at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
at TLSSocket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:10:42)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
2021-02-21T01:28:50.763Z [4567/7] - error: error: prepared statement "getObjectFields" already exists
at Parser.parseErrorMessage (/usr/src/app/node_modules/pg-protocol/dist/parser.js:278:15)
at Parser.handlePacket (/usr/src/app/node_modules/pg-protocol/dist/parser.js:126:29)
at Parser.parse (/usr/src/app/node_modules/pg-protocol/dist/parser.js:39:38)
at TLSSocket.<anonymous> (/usr/src/app/node_modules/pg-protocol/dist/index.js:10:42)
at TLSSocket.emit (events.js:315:20)
at addChunk (internal/streams/readable.js:309:12)
at readableAddChunk (internal/streams/readable.js:284:9)
at TLSSocket.Readable.push (internal/streams/readable.js:223:10)
at TLSWrap.onStreamRead (internal/stream_base_commons.js:188:23)
The command '/bin/sh -c node ./nodebb build' returned a non-zero code: 1
If I change the config.json to point to my local PostgreSQL instance, instead, it works fine.
As far as I can tell, all the database objects are being correctly created both locally and at DigitalOcean. There are 6 tables created, 1 view, 1 routine, and 1 object type.
Neither my local version of the database, nor the DB at DigitalOcean have a prepared statement called getObjectFields
.
Can anyone suggest something else to try? Thanks!