Page MenuHomeDevCentral

D2867.diff
No OneTemporary

D2867.diff

diff --git a/Dockerfile b/Dockerfile
--- a/Dockerfile
+++ b/Dockerfile
@@ -5,6 +5,10 @@
RUN apt-get update ; apt-get install -y \
wget \
&& rm -rf /var/lib/apt/lists/* \
+ && mkdir /usr/local/share/postgres-init \
&& wget -O $(pg_config --pkglibdir)/wal2json.so https://github.com/getsentry/wal2json/releases/download/$WAL2JSON_VERSION/wal2json-Linux-x86_64-glibc.so
+COPY files/pg_hba.conf /usr/local/share/postgres-init/
+COPY files/provision-init-config.sh /docker-entrypoint-initdb.d/
+
CMD ["postgres", "-c", "wal_level=logical", "-c", "max_replication_slots=1", "-c", "max_wal_senders=1"]
diff --git a/files/pg_hba.conf b/files/pg_hba.conf
new file mode 100644
--- /dev/null
+++ b/files/pg_hba.conf
@@ -0,0 +1,25 @@
+# -------------------------------------------------------------
+# PostgreSQL — Client authentication configuration file
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Scope: Sentry
+# License: Trivial work, not eligible to copyright
+# Description: Allow standard PostgreSQL Docker image
+# client authentication, and replication.
+# Reference: https://www.postgresql.org/docs/9.6/auth-pg-hba-conf.html
+# -------------------------------------------------------------
+
+# TYPE DATABASE USER ADDRESS METHOD
+
+# "local" is for Unix domain socket connections only
+local all all trust
+
+# IPv4 and IPv6 local connections
+host all all 127.0.0.1/32 trust
+host all all ::1/128 trust
+
+# Standard user connections
+host all all all md5
+
+# Replication
+host replication all all md5
diff --git a/files/provision-init-config.sh b/files/provision-init-config.sh
new file mode 100755
--- /dev/null
+++ b/files/provision-init-config.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+cp /usr/local/share/postgres-init/pg_hba.conf "$PGDATA/pg_hba.conf"

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 23, 10:07 (17 h, 41 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2257733
Default Alt Text
D2867.diff (2 KB)

Event Timeline