Commit 4667dd30 authored by Jonathan Osorio Alcalá's avatar Jonathan Osorio Alcalá
Browse files

[ADD] docker-psql: add postgresql v14.0 for ci

parent 61552a96
Pipeline #186374 passed with stage
in 4 minutes and 14 seconds
......@@ -22,6 +22,16 @@ build_10_ci:
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-${PSQL_TYPE} --docker-image vauxoo/docker-postgresql
build_14_ci:
stage: build
tags:
- build
variables:
PSQL_VERSION: '14'
PSQL_TYPE: 'ci'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-${PSQL_TYPE} --docker-image vauxoo/docker-postgresql
build_10_dev:
stage: build
tags:
......@@ -81,3 +91,13 @@ build_10_absa_dev:
PSQL_TYPE: 'absa-dev'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-${PSQL_TYPE} --docker-image vauxoo/docker-postgresql
build_14_dev:
stage: build
tags:
- build
variables:
PSQL_VERSION: '14'
PSQL_TYPE: 'dev'
script:
- python3 ./build.py --folder ./postgresql${PSQL_VERSION}-${PSQL_TYPE} --docker-image vauxoo/docker-postgresql
FROM postgres:14-alpine
ENV LC_COLLATE "C"
RUN mkdir -p /etc/postgresql/
COPY ./postgresql.conf /etc/postgresql/postgresql.conf
RUN chown postgres:postgres -R /etc/postgresql
RUN apk add alpine-sdk clang llvm python3 py3-pip && pip3 install pgxnclient && pgxn install --stable postgresql_anonymizer
CMD ["postgres", "-c", "config_file=/etc/postgresql/postgresql.conf"]
This diff is collapsed.
### 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-10-main.log'
log_rotation_age=0
log_checkpoints=on
log_hostname=on
log_line_prefix='%t [%p]: [%l-1] db=%d,user=%u,client=%h,app=%a '
lc_messages='C'
log_timezone='UTC'
log_min_duration_statement=0
client_min_messages=notice
log_min_messages=warning
log_min_error_statement=error
log_duration=off
log_error_verbosity=verbose
log_lock_waits=on
log_statement='none'
log_temp_files=0
log_connections=on
log_disconnections=on
FROM postgres:14-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 ./20-pgbadger_enable.conf.disabled /etc/postgresql/conf.d/20-pgbadger_enable.conf.disabled
COPY ./entry_point.sh /entry_point.sh
RUN apk add alpine-sdk clang llvm python3 py3-pip && pip3 install pgxnclient && pgxn install --stable postgresql_anonymizer
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"
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.
Supports Markdown
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