Skip to content

Commit

Permalink
Merge pull request #606 from frastr/bugfix-docker-postgres
Browse files Browse the repository at this point in the history
[-] fix `pgwatch2-postgres` Docker image
  • Loading branch information
pashagolub committed Feb 23, 2023
2 parents 8a2ddf7 + aa0aade commit 7629335
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docker-launcher-postgres.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/bin/bash

mkdir /var/run/grafana && chown grafana /var/run/grafana
mkdir -p /var/run/grafana && chown grafana /var/run/grafana
chown grafana:grafana /var/lib/grafana

if [ ! -f /pgwatch2/persistent-config/self-signed-ssl.key -o ! -f /pgwatch2/persistent-config/self-signed-ssl.pem ] ; then
openssl req -x509 -newkey rsa:4096 -keyout /pgwatch2/persistent-config/self-signed-ssl.key -out /pgwatch2/persistent-config/self-signed-ssl.pem -days 3650 -nodes -sha256 -subj '/CN=pw2'
Expand Down Expand Up @@ -73,7 +74,7 @@ else
su -c "psql -d pgwatch2_metrics -f /pgwatch2/sql/metric_store/metric-time/ensure_partition_metric_time.sql" postgres
fi
su -c "psql -d pgwatch2 -f /pgwatch2/metrics/00_helpers/get_load_average/9.1/metric.sql" postgres
su -c "psql -d pgwatch2 -f /pgwatch2/metrics/00_helpers/get_stat_statements/9.2/metric.sql" postgres
su -c "psql -d pgwatch2 -f /pgwatch2/metrics/00_helpers/get_stat_statements/9.4/metric.sql" postgres
su -c "psql -d pgwatch2 -f /pgwatch2/metrics/00_helpers/get_stat_activity/9.2/metric.sql" postgres
su -c "psql -d pgwatch2 -f /pgwatch2/metrics/00_helpers/get_stat_replication/9.2/metric.sql" postgres
su -c "psql -d pgwatch2 -f /pgwatch2/metrics/00_helpers/get_table_bloat_approx/9.5/metric.sql" postgres
Expand Down
1 change: 0 additions & 1 deletion postgresql.conf
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ logging_collector=on
log_directory='/var/log/postgresql'
log_filename='postgresql-%a.log'
log_truncate_on_rotation=on
stats_temp_directory='pg_stat_tmp'
autovacuum_freeze_max_age=2000000000
wal_level=archive
archive_mode=on
Expand Down

0 comments on commit 7629335

Please sign in to comment.