Skip to content

Commit

Permalink
adjust postgres config
Browse files Browse the repository at this point in the history
  • Loading branch information
chrinorse committed Dec 15, 2023
1 parent 1bfaac7 commit 8e0c922
Show file tree
Hide file tree
Showing 3 changed files with 832 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
ARG base=docker.io/library/postgres:15-bookworm
FROM $base

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends postgresql-15-debversion
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends postgresql-15-debversion && \
echo 'CREATE EXTENSION debversion' > /docker-entrypoint-initdb.d/create-extension.sql

ADD create-certificate.sh /docker-entrypoint-initdb.d
ADD postgresql.conf /etc/postgresql/
12 changes: 12 additions & 0 deletions create-certificate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash

openssl req -newkey rsa:4096 \
-x509 \
-sha256 \
-days 3650 \
-nodes \
-out /var/lib/postgresql/data/pgdata/server.crt \
-keyout /var/lib/postgresql/data/pgdata/server.key \
-subj "/C=DE/ST=BW/L=Walldorf/O=Security/OU=IT Department/CN=GLVD"

cp /etc/posttgresql/postgresql.conf /var/lib/postgresql/data/pgdata/.
Loading

0 comments on commit 8e0c922

Please sign in to comment.