Skip to content

Commit

Permalink
psql
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanma committed Apr 1, 2018
1 parent 00233f7 commit 810ffcc
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 11 deletions.
4 changes: 3 additions & 1 deletion pgbouncer/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ MAINTAINER Juan Manuel Torres <juanmanuel.torres@aventurabinaria.es>
RUN apt-get update \
&& apt-get install -y \
nano \
pgbouncer
pgbouncer \
postgresql-client-9.6 \
postgresql-client-common

VOLUME /files/users
EXPOSE 5432
Expand Down
1 change: 1 addition & 0 deletions pgpool/docker/Dockerfile-centos
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ ENV PGHOST="/tmp/" \
PCPUSER="admin" \
PCPPASS="admin" \
PG_NUM_INIT_CHILDREN="400" \
PG_MULTIPLER_BACK="8" \
PG_MAX_POOL="4" \
PG_CHILD_LIFE_TIME="3600" \
PG_CLIENT_IDLE_LIMIT="3600" \
Expand Down
18 changes: 8 additions & 10 deletions pgpool/docker/Makefile
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@

build:
docker build -f Dockerfile-centos -t tedezed/pgpool-centos:latest .
CONTAINER_REPO:=tedezed
CONTAINER_IMAGE:=pgpool-centos
CONTAINER_VERSION:=latest

build-debian:
docker build -f Dockerfile-debian -t tedezed/pgpool-debian:latest .
build:
docker build -f Dockerfile-centos -t ${CONTAINER_REPO}/${CONTAINER_IMAGE}:${CONTAINER_VERSION} .

push:
docker push tedezed/pgpool-centos:latest

push-debian:
docker push tedezed/pgpool-debian:latest
docker push ${CONTAINER_REPO}/${CONTAINER_IMAGE}:${CONTAINER_VERSION}

all:
docker build -f Dockerfile-centos -t tedezed/pgpool-centos:latest .
docker push tedezed/pgpool-centos:latest
docker build -f Dockerfile-centos -t ${CONTAINER_REPO}/${CONTAINER_IMAGE}:${CONTAINER_VERSION} .
docker push ${CONTAINER_REPO}/${CONTAINER_IMAGE}:${CONTAINER_VERSION}
1 change: 1 addition & 0 deletions pgpool/docker/bin/pgpool/startpgpool.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ sed -i "s/PG_PASSWORD/$PG_PASSWORD/g" $CONFIGS/pgpool.conf
# Personal configuration
sed -i "s/PG_NUM_INIT_CHILDREN/$PG_NUM_INIT_CHILDREN/g" $CONFIGS/pgpool.conf
sed -i "s/PG_MAX_POOL/$PG_MAX_POOL/g" $CONFIGS/pgpool.conf
sed -i "s/PG_MULTIPLER_BACK/$PG_MULTIPLER_BACK/g" $CONFIGS/pgpool.conf
sed -i "s/PG_CHILD_LIFE_TIME/$PG_CHILD_LIFE_TIME/g" $CONFIGS/pgpool.conf
sed -i "s/PG_CLIENT_IDLE_LIMIT/$PG_CLIENT_IDLE_LIMIT/g" $CONFIGS/pgpool.conf
sed -i "s/PG_MAX_CONNECTIONS/$PG_MAX_CONNECTIONS/g" $CONFIGS/pgpool.conf
Expand Down
2 changes: 2 additions & 0 deletions pgpool/docker/conf/pgpool/default.pgpool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,8 @@ max_pool = PG_MAX_POOL
# Number of connections per pool
# (change requires restart)

listen_backlog_multiplier = PG_MAX_POOL

# - Life time -

child_life_time = PG_CHILD_LIFE_TIME
Expand Down
2 changes: 2 additions & 0 deletions pgpool/docker/conf/pgpool/pgpool.conf
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,8 @@ max_pool = PG_MAX_POOL
# Number of connections per pool
# (change requires restart)

listen_backlog_multiplier = PG_MULTIPLER_BACK

# - Life time -

child_life_time = PG_CHILD_LIFE_TIME
Expand Down

0 comments on commit 810ffcc

Please sign in to comment.