From a0dac1cf763cba6bb14b42e4a897181024786757 Mon Sep 17 00:00:00 2001 From: matthias Date: Thu, 2 Mar 2023 10:26:08 +0100 Subject: [PATCH] some modifications --- docker/postgres-stage/Dockerfile | 5 +++-- scripts/exporter/structure.sql | 4 +++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docker/postgres-stage/Dockerfile b/docker/postgres-stage/Dockerfile index d2cd660..0ba0115 100644 --- a/docker/postgres-stage/Dockerfile +++ b/docker/postgres-stage/Dockerfile @@ -62,6 +62,7 @@ RUN ${PACKAGER} -y update && ${PACKAGER} -y install --nodocs \ busybox \ dpkg \ jq \ + rsync \ && ${PACKAGER} -y clean all; @@ -217,7 +218,7 @@ RUN mkdir /package && cd /package && wget http://smarden.org/runit/runit-2.1.2. RUN ln -s /usr/local/bin/dumb-init /usr/bin/dumb-init && ln -s /usr/local/bin/runsvdir /usr/bin/runsvdir # Clean Up git-repos -RUN rm -rf /pgextwlist /pg_stat_kcache /package /oracle_fdw /pgnodemx \ +RUN rm -rf /pgextwlist /pg_stat_kcache /oracle_fdw /pgnodemx \ && rm /etc/pgbackrest.conf && rm -rf /var/spool/pgbackrest; # Clean Up Packages @@ -234,7 +235,7 @@ ARG TIMESCALEDB EXPOSE 5432 8008 8080 ENV LC_ALL=en_US.utf-8 \ - PATH=$PATH:/usr/pgsql-$PGVERSION/bin \ + PATH=$PATH:/usr/pgsql-$PGVERSION/bin \ PGHOME=/home/postgres \ RW_DIR=/run \ TIMESCALEDB=$TIMESCALEDB \ diff --git a/scripts/exporter/structure.sql b/scripts/exporter/structure.sql index ec1be9c..c47fd95 100644 --- a/scripts/exporter/structure.sql +++ b/scripts/exporter/structure.sql @@ -1,10 +1,12 @@ # User +CREATE ROLE postgres_exporter with password 'password'; +ALTER ROLE postgres_exporter login; GRANT pg_monitor TO postgres_exporter; GRANT SELECT ON TABLE pg_authid TO postgres_exporter; -# Structure +// Structure CREATE SCHEMA exporter;