diff --git a/Dockerfile b/Dockerfile index 76b1d01..eb39034 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,7 +2,7 @@ FROM registry.gitlab.com/thallian/docker-confd-env:master ENV PGDATA /var/lib/postgresql/data -RUN apk add --no-cache postgresql postgresql-contrib ca-certificates +RUN apk add --no-cache postgresql postgresql-contrib RUN mkdir -p /run/postgresql && mkdir -p $PGDATA RUN chown -R postgres /run/postgresql && chown -R postgres $PGDATA diff --git a/README.md b/README.md index bf6c292..e6d9a89 100644 --- a/README.md +++ b/README.md @@ -2,15 +2,11 @@ # Volumes - `/var/lib/postgresql/data` -- `/etc/ssl/postgresql/`: certificates directory # Environment Variables ## POSTGRES_PASSWORD Password for the postgre admin user. -## CERT_DOMAIN -Name of the certificate domain. - # Ports - 5432 diff --git a/rootfs/bin/restart-services b/rootfs/bin/restart-services deleted file mode 100755 index 49f7158..0000000 --- a/rootfs/bin/restart-services +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/with-contenv sh - -kill -s TERM $(head -1 ${PGDATA}/postmaster.pid) diff --git a/rootfs/etc/confd/templates/pg_hba.conf.tmpl b/rootfs/etc/confd/templates/pg_hba.conf.tmpl index 65c716f..279bd74 100644 --- a/rootfs/etc/confd/templates/pg_hba.conf.tmpl +++ b/rootfs/etc/confd/templates/pg_hba.conf.tmpl @@ -1,3 +1,3 @@ local all all trust -hostssl all all 0.0.0.0/0 md5 +host all all 0.0.0.0/0 md5 host all all ::1/128 trust diff --git a/rootfs/etc/services.d/postgres/run b/rootfs/etc/services.d/postgres/run index b76b6e1..a5bcdf7 100755 --- a/rootfs/etc/services.d/postgres/run +++ b/rootfs/etc/services.d/postgres/run @@ -2,7 +2,4 @@ exec s6-setuidgid postgres postgres \ -D $PGDATA \ - -c listen_addresses='*' \ - -c ssl=on \ - -c ssl_cert_file="/etc/ssl/postgresql/${CERT_DOMAIN}.crt" \ - -c ssl_key_file="/etc/ssl/postgresql/${CERT_DOMAIN}.key" + -c listen_addresses='*' diff --git a/rootfs/var/spool/incron/root b/rootfs/var/spool/incron/root deleted file mode 100644 index 9bd94e9..0000000 --- a/rootfs/var/spool/incron/root +++ /dev/null @@ -1 +0,0 @@ -/etc/ssl/postgresql IN_ATTRIB /bin/restart-services