Skip to content

Commit badca54

Browse files
Fixed API key cutting
1 parent e560765 commit badca54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ services:
132132
volumes:
133133
- ./reporter/postgres_reports.py:/app/postgres_reports.py
134134
- ./reporter/requirements.txt:/app/requirements.txt
135-
- ./.pgwatch-config:/app/.pgwatch-config:ro
135+
- ./.pgwatch-config:/app/.pgwatch-config
136136
environment:
137137
- PROMETHEUS_URL=http://sink-prometheus:9090
138138
depends_on:
@@ -148,7 +148,7 @@ 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) &&
151+
API_KEY=$$(grep '^api_key=' /app/.pgwatch-config | cut -d'=' -f2-) &&
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...' &&

0 commit comments

Comments
 (0)