PgBouncer with external config and logs.
4.6K
FROM ubuntu:18.04
ENV DEBIAN_FRONTEND noninteractive
RUN set -x
&& apt-get -qq update
&& apt-get install -yq --no-install-recommends pgbouncer
&& apt-get purge -y --auto-remove
&& rm -rf /var/lib/apt/lists/*
ADD entrypoint.sh ./
EXPOSE 6432 ENTRYPOINT ["./entrypoint.sh"]
entrypoint.sh
#!/bin/bash set -e
PG_LOG=/logs PG_CONFIG=/etc/pgbouncer/pgbouncer.ini PG_USER=postgres
mkdir -p ${PG_LOG} chmod -R 755 ${PG_LOG} chown -R ${PG_USER}:${PG_USER} ${PG_LOG}
echo "Starting pgbouncer..." exec pgbouncer -q -u ${PG_USER} $PG_CONFIG
Using in docker-compose
version: '3' services: pgbouncer: image: mobsted/pgbouncer:latest container_name: mbst_pgbouncer volumes: - ./conf/pgbouncer/pgbouncer.ini:/etc/pgbouncer/pgbouncer.ini - ./logs/pgbouncer/pgbouncer.log:/logs/pgbouncer.log ports: - "6432:6432" depends_on: - postgres networks: - backend - frontend networks: backend: frontend:
Content type
Image
Digest
Size
32.4 MB
Last updated
about 8 years ago
docker pull mobsted/pgbouncer