File tree Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Expand file tree Collapse file tree 2 files changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,20 @@ RUN git clone git://github.com/theory/pgtap.git \
23
23
RUN apt-get update \
24
24
&& apt-get install postgresql-plpython3-12 -y
25
25
26
+ # install pgAudit
27
+ RUN pgAuditDependencies="postgresql-server-dev-$PG_MAJOR \
28
+ libssl-dev \
29
+ libkrb5-dev \
30
+ git-core" \
31
+ && apt-get update \
32
+ && apt-get install -y --no-install-recommends ${pgAuditDependencies} \
33
+ && cd /tmp \
34
+ && git clone https://github.com/pgaudit/pgaudit.git \
35
+ && cd pgaudit \
36
+ && git checkout master \
37
+ && make check USE_PGXS=1 \
38
+ && make install USE_PGXS=1
39
+
26
40
# install plv8
27
41
ENV PLV8_VERSION=r3.0alpha
28
42
Original file line number Diff line number Diff line change 2
2
set -e
3
3
4
4
echo " host replication $POSTGRES_USER 0.0.0.0/0 trust" >> $PGDATA /pg_hba.conf
5
- echo " shared_preload_libraries = 'pg_stat_statements'" >> $PGDATA /postgresql.conf
5
+ echo " shared_preload_libraries = 'pg_stat_statements, pgaudit '" >> $PGDATA /postgresql.conf
6
6
echo " pg_stat_statements.max = 10000" >> $PGDATA /postgresql.conf
7
7
echo " pg_stat_statements.track = all" >> $PGDATA /postgresql.conf
8
8
echo " wal_level=logical" >> $PGDATA /postgresql.conf
9
9
echo " max_replication_slots=5" >> $PGDATA /postgresql.conf
10
10
echo " max_wal_senders=10" >> $PGDATA /postgresql.conf
11
+ echo " log_destination='csvlog'" >> $PGDATA /postgresql.conf
12
+ echo " logging_collector=on" >> $PGDATA /postgresql.conf
13
+ echo " log_filename='postgresql.log'" >> $PGDATA /postgresql.conf
14
+ echo " log_rotation_age=0" >> $PGDATA /postgresql.conf
15
+ echo " log_rotation_size=0" >> $PGDATA /postgresql.conf
You can’t perform that action at this time.
0 commit comments