# HG changeset patch # User Tom Gottfried # Date 1478879569 -3600 # Node ID 2e59a51d914f11f5aba660e69ed3e163caae9353 # Parent 5239306ee55eef5c43ac6a7f3759d010ebae20f0 Integrate Audit Log Analyzer. XXX: Startup of the Log Analyzer will only be successful when patched because of a bug that prevents it from recovering from errors (i.e. while postgres is starting). diff -r 5239306ee55e -r 2e59a51d914f db_schema/Dockerfile --- a/db_schema/Dockerfile Fri Nov 11 16:50:00 2016 +0100 +++ b/db_schema/Dockerfile Fri Nov 11 16:52:49 2016 +0100 @@ -109,11 +109,6 @@ # # Set the default command to run when starting the container # -CMD ["/usr/lib/postgresql/9.5/bin/postgres", \ - "--config_file=/etc/postgresql/9.5/main/postgresql.conf"] - -# To use pgaudit/analyze from within the container: -# psql -f pgaudit/analyze/sql/audit.sql lada -# cd pgaudit/analyze/bin -# ./pgaudit_analyze /var/log/postgresql/ \ -# --log-file /var/log/postgresql/pgaudit_analyze.log +CMD /usr/lib/postgresql/9.5/bin/postgres --config_file=$PGCONF & \ + pgaudit/analyze/bin/pgaudit_analyze /var/log/postgresql/ \ + --log-file /var/log/postgresql/pgaudit_analyze.log diff -r 5239306ee55e -r 2e59a51d914f db_schema/setup-db.sh --- a/db_schema/setup-db.sh Fri Nov 11 16:50:00 2016 +0100 +++ b/db_schema/setup-db.sh Fri Nov 11 16:52:49 2016 +0100 @@ -65,8 +65,8 @@ echo create extensions psql $DB_CONNECT_STRING -d $DB_NAME --command \ - "CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public; - CREATE EXTENSION IF NOT EXISTS pgaudit;" + "CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;" +psql $DB_CONNECT_STRING -d $DB_NAME -f $DIR/pgaudit/analyze/sql/audit.sql echo create stammdaten schema psql -q $DB_CONNECT_STRING -d $DB_NAME -f $DIR/stammdaten_schema.sql