Commit 0d5ebfdf authored by Jonathan Osorio Alcalá's avatar Jonathan Osorio Alcalá
Browse files

[ADD] docker-psql: Add 13-irc-dev to reducce postgres consumption

parent 5e0c04a9
Pipeline #152027 passed with stage
in 28 seconds
......@@ -51,3 +51,13 @@ build_13_dev:
PSQL_TYPE: 'dev'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-${PSQL_TYPE} --docker-image vauxoo/docker-postgresql
build_13_irc_dev:
stage: build
tags:
- build
variables:
PSQL_VERSION: '13'
PSQL_TYPE: 'irc-dev'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-${PSQL_TYPE} --docker-image vauxoo/docker-postgresql
### PGHero config
shared_preload_libraries = 'pg_stat_statements'
pg_stat_statements.track = all
pg_stat_statements.max = 10000
track_activity_query_size = 2048
### PGBadger config
logging_collector=on
log_destination='stderr'
log_directory='/var/log/pg_log'
log_filename='postgresql-13-main.log'
log_rotation_age=0
log_checkpoints=on
log_hostname=on
log_line_prefix='%t [%p]: [%l-1] db=%d,user=%u '
lc_messages='C'
log_timezone='UTC'
FROM postgres:13-alpine
ENV LC_COLLATE "C"
RUN mkdir -p /etc/postgresql/conf.d \
&& mkdir -p /var/log/pg_log
COPY ./postgresql.conf /etc/postgresql/postgresql.conf
COPY ./pg_hba.conf /etc/postgresql/pg_hba.conf
COPY ./10-pgbadger_pre.conf /etc/postgresql/conf.d/10-pgbadger_pre.conf
COPY ./entry_point.sh /entry_point.sh
VOLUME ["/var/log/pg_log", "/var/lib/postgresql/data/pgdata"]
ENTRYPOINT ["/entry_point.sh"]
#!/usr/bin/env sh
set -e
chown postgres:postgres /var/log/pg_log
chown -R postgres:postgres /var/lib/postgresql/data/pgdata
chmod 0700 /var/lib/postgresql/data/pgdata
su postgres -c "postgres -c config_file=/etc/postgresql/postgresql.conf"
\ No newline at end of file
local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all peer
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local replication all peer
host replication all 127.0.0.1/32 md5
host replication all ::1/128 md5
host all all 0.0.0.0/0 md5
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment