Skip to content

Commit e560765

Browse files
Fixed postgres-reports key aquisition
1 parent 9973af5 commit e560765

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,14 @@ services:
148148
while true; do
149149
echo 'Generating PostgreSQL reports...' &&
150150
if [ -f /app/.pgwatch-config ] && grep -q '^api_key=' /app/.pgwatch-config; then
151-
API_KEY=$$(grep '^api_key=' /app/.pgwatch-config | cut -d'=' -f2) &&
151+
API_KEY=$$(grep '^api_key=' /app/.pgwatch-config) &&
152152
python postgres_reports.py --prometheus-url http://sink-prometheus:9090 --output /app/all_reports_$$(date +%Y%m%d_%H%M%S).json --token $$API_KEY --project postgres-ai-monitoring
153153
else
154154
echo 'No API key configured, generating reports without upload...' &&
155155
python postgres_reports.py --prometheus-url http://sink-prometheus:9090 --output /app/all_reports_$$(date +%Y%m%d_%H%M%S).json --no-upload
156156
fi &&
157-
echo 'Reports generated. Sleeping for 24 hours...' &&
158-
sleep 86400
157+
echo 'Reports generated. Sleeping for 5 minutes...' &&
158+
sleep 300
159159
done
160160
"
161161

0 commit comments

Comments
 (0)