Compare commits
5 Commits
b1502ceeb5
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
938ae69f84
|
|||
|
5dff2844d6
|
|||
|
64ba518231
|
|||
|
5e33411897
|
|||
|
183e61a199
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
.DS_Store
|
||||||
@@ -1,7 +1,4 @@
|
|||||||
FROM --platform=${TARGETPLATFORM} alpine:3.13
|
FROM alpine:edge
|
||||||
|
|
||||||
ARG TARGETPLATFORM
|
|
||||||
ARG BUILDPLATFORM
|
|
||||||
|
|
||||||
RUN apk --update add libevent openssl c-ares gettext ca-certificates pgbouncer
|
RUN apk --update add libevent openssl c-ares gettext ca-certificates pgbouncer
|
||||||
|
|
||||||
@@ -9,7 +6,8 @@ WORKDIR /
|
|||||||
|
|
||||||
RUN addgroup -S pgbouncer \
|
RUN addgroup -S pgbouncer \
|
||||||
&& adduser -S pgbouncer \
|
&& adduser -S pgbouncer \
|
||||||
&& mkdir -p /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer
|
&& mkdir -p /etc/pgbouncer /var/log/pgbouncer /var/run/pgbouncer \
|
||||||
|
&& update-ca-certificates
|
||||||
|
|
||||||
COPY pgbouncer.ini.tmpl /etc/pgbouncer/
|
COPY pgbouncer.ini.tmpl /etc/pgbouncer/
|
||||||
COPY auth_file.txt.tmpl /etc/pgbouncer/
|
COPY auth_file.txt.tmpl /etc/pgbouncer/
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
"$PGUSER" "$PGPASSWORD"
|
"$PGUSER" "$PGPASSWORD"
|
||||||
"$STATS_USER" "$STATS_PASSWORD"
|
|
||||||
|
|||||||
22
nydus-prefetch.txt
Normal file
22
nydus-prefetch.txt
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
/bin/busybox
|
||||||
|
/lib/ld-musl-aarch64.so.1
|
||||||
|
/entrypoint.sh
|
||||||
|
/usr/bin/openssl
|
||||||
|
/lib/libssl.so.3
|
||||||
|
/lib/libcrypto.so.3
|
||||||
|
/etc/ssl/openssl.cnf
|
||||||
|
/etc/ssl/certs/pgbouncer.key
|
||||||
|
/etc/ssl/certs/pgbouncer.crt
|
||||||
|
/etc/pgbouncer/pgbouncer.ini.tmpl
|
||||||
|
/etc/pgbouncer/pgbouncer.ini
|
||||||
|
/usr/bin/envsubst
|
||||||
|
/usr/lib/libintl.so.8.4.0
|
||||||
|
/etc/pgbouncer/auth_file.txt.tmpl
|
||||||
|
/etc/pgbouncer/auth_file.txt
|
||||||
|
/usr/bin/pgbouncer
|
||||||
|
/usr/lib/libcares.so.2.6.1
|
||||||
|
/usr/lib/libevent-2.1.so.7.0.1
|
||||||
|
/etc/ssl/certs/ca-certificates.crt
|
||||||
|
/var/log/pgbouncer/pgbouncer.log
|
||||||
|
/etc/nsswitch.conf
|
||||||
|
/run/pgbouncer/pgbouncer.pid
|
||||||
@@ -7,10 +7,10 @@
|
|||||||
pool_mode = $CONNECTION_POOLER_MODE
|
pool_mode = $CONNECTION_POOLER_MODE
|
||||||
listen_port = $CONNECTION_POOLER_PORT
|
listen_port = $CONNECTION_POOLER_PORT
|
||||||
listen_addr = *
|
listen_addr = *
|
||||||
auth_type = plain
|
auth_type = md5
|
||||||
auth_file = /etc/pgbouncer/auth_file.txt
|
auth_file = /etc/pgbouncer/auth_file.txt
|
||||||
admin_users = $PGUSER
|
admin_users = $PGUSER
|
||||||
stats_users = $STATS_USER
|
stats_users_prefix = robot_
|
||||||
auth_query = SELECT * FROM $PGSCHEMA.user_lookup($1)
|
auth_query = SELECT * FROM $PGSCHEMA.user_lookup($1)
|
||||||
logfile = /var/log/pgbouncer/pgbouncer.log
|
logfile = /var/log/pgbouncer/pgbouncer.log
|
||||||
pidfile = /var/run/pgbouncer/pgbouncer.pid
|
pidfile = /var/run/pgbouncer/pgbouncer.pid
|
||||||
@@ -30,7 +30,14 @@ default_pool_size = $CONNECTION_POOLER_DEFAULT_SIZE
|
|||||||
|
|
||||||
# Add more server connections to pool if below this number. Improves behavior
|
# Add more server connections to pool if below this number. Improves behavior
|
||||||
# when usual load comes suddenly back after period of total inactivity.
|
# when usual load comes suddenly back after period of total inactivity.
|
||||||
min_pool_size = $CONNECTION_POOLER_MIN_SIZE
|
#
|
||||||
|
# NOTE: This value is per pool, i.e. a pair of (db, user), not a global one.
|
||||||
|
# Which means on the higher level it has to be calculated from the max allowed
|
||||||
|
# database connections and number of databases and users. If not taken into
|
||||||
|
# account, then for too many users or databases PgBouncer will go crazy
|
||||||
|
# opening/evicting connections. For now disable it.
|
||||||
|
#
|
||||||
|
# min_pool_size = $CONNECTION_POOLER_MIN_SIZE
|
||||||
|
|
||||||
# How many additional connections to allow to a pool
|
# How many additional connections to allow to a pool
|
||||||
reserve_pool_size = $CONNECTION_POOLER_RESERVE_SIZE
|
reserve_pool_size = $CONNECTION_POOLER_RESERVE_SIZE
|
||||||
|
|||||||
Reference in New Issue
Block a user