Skip to content

Commit f6660e7

Browse files
Merge pull request #14 from icdocsoc/feat/support-postgres-crt
feat: support for postgresql certificate for ssl connections
2 parents 59e8b5a + 1ca33ec commit f6660e7

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

collection/.env.local.template

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ ROOT_USER_EMAIL="[email protected]"
2323
# Replace "postgres:postgres" with "<username>:<password>"
2424
# And docsoc-tools-collection with the name of the database you are using
2525
COLLECTION_DATABASE_URL="postgres://postgres:postgres@localhost:5432/docsoc-tools-collection"
26+
27+
# Optional PSQL certicate if the connection occurs over SSL
28+
PG_CERT=

collection/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ COPY --from=builder /build/collection/.next/standalone/common ./
4646
COPY --from=builder /build/collection/.next/standalone/package.json ./
4747
COPY --from=builder /build/collection/.next/standalone/node_modules ./node_modules
4848
COPY --from=builder /build/collection/.next/static ./.next/static
49+
COPY --from=builder /build/collection/entry.sh ./entry.sh
4950
COPY --from=builder --chown=node:node /build/collection/prisma ./prisma
5051

5152

@@ -60,4 +61,4 @@ EXPOSE 3000
6061
# Learn more here: https://nextjs.org/telemetry
6162
# Uncomment the following line in case you want to disable telemetry.
6263
ENV NEXT_TELEMETRY_DISABLED=1
63-
CMD ["dumb-init", "node", "server.js"]
64+
CMD ["./entry.sh"]

collection/entry.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/dumb-init /bin/sh
2+
3+
# This is to be used with the Docker Container only!
4+
# The script loads the PSQL certificate and starts the server.
5+
6+
echo $PG_CERT > ./prisma/postgres.crt
7+
8+
node server.js

0 commit comments

Comments
 (0)