Intial commit.

This commit is contained in:
2021-06-06 15:49:19 +02:00
commit b1502ceeb5
4 changed files with 98 additions and 0 deletions

17
entrypoint.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/sh
set -ex
if [ "$PGUSER" = "postgres" ]; then
echo "WARNING: pgbouncer will connect with a superuser privileges!"
echo "You need to fix this as soon as possible."
fi
openssl req -nodes -new -x509 -subj /CN=spilo.dummy.org \
-keyout /etc/ssl/certs/pgbouncer.key \
-out /etc/ssl/certs/pgbouncer.crt
envsubst < /etc/pgbouncer/pgbouncer.ini.tmpl > /etc/pgbouncer/pgbouncer.ini
envsubst < /etc/pgbouncer/auth_file.txt.tmpl > /etc/pgbouncer/auth_file.txt
exec /usr/bin/pgbouncer /etc/pgbouncer/pgbouncer.ini