OP#176 edit start.sh

This commit is contained in:
2025-12-02 16:36:55 +01:00
parent f013444bd4
commit 2a7a6aee3e
2 changed files with 7 additions and 4 deletions

View File

@@ -4,7 +4,7 @@
## Purpose
This image is entirely based on the [PostgreSQL Prometheus Adapter](https://github.com/CrunchyData/postgresql-prometheus-adapter) from [Chrunchydata](https://3for.me/w5wl2). From their website:
This image is entirely based on the [PostgreSQL Prometheus Adapter](https://github.com/CrunchyData/postgresql-prometheus-adapter) from [Chrunchydata](https://3for.me/w5wl2). From their website:
> PostgreSQL Prometheus Adapter is a remote storage adapter designed to utilize PostgreSQL 12 native partitioning enhancements to efficiently store Prometheus time series data in a PostgreSQL database.
@@ -12,4 +12,5 @@ This image is entirely based on the [PostgreSQL Prometheus Adapter](https://gith
However we did a few changes to adjust the following:
* the entire build flow is now based on the docker file, no external make step. This allows using a Jenkins CI/CD pipeline for both build and placing the image in a package registry, so the image can be used in Kubernetes via CI/CD. All manual steps are removed.
* the entire build flow is now based on the Dockerfile, no external make step. This allows using a Jenkins CI/CD pipeline for both build and placing the image in a package registry, so the image can be used in Kubernetes via CI/CD. All manual steps are removed.
* we moved away from CentOS 7 as base to Alpine, which creates a much smaller image footprint while providing the very same functionality.

View File

@@ -1,5 +1,7 @@
#!/bin/bash
set -e
if [[ "${DATABASE_URL}" == "" ]]; then
echo 'Missing DATABASE_URL'
echo 'example -e DATABASE_URL="user=<db user> password=<db user password> host=<db host> port=<db port> database=<db name>"'
@@ -23,7 +25,7 @@ pg_commit_rows=${pg_commit_rows:-20000}
pg_threads="${pg_threads:-1}"
parser_threads="${parser_threads:-5}"
echo /usr/local/bin/postgresql-prometheus-adapter \
echo "/usr/local/bin/postgresql-prometheus-adapter \
--adapter-send-timeout=${adapter_send_timeout} \
--web-listen-address=${web_listen_address} \
--web-telemetry-path=${web_telemetry_path} \
@@ -33,7 +35,7 @@ echo /usr/local/bin/postgresql-prometheus-adapter \
--pg-commit-secs=${pg_commit_secs} \
--pg-commit-rows=${pg_commit_rows} \
--pg-threads=${pg_threads} \
--parser-threads=${parser_threads}
--parser-threads=${parser_threads}"
/usr/local/bin/postgresql-prometheus-adapter \
--adapter-send-timeout=${adapter_send_timeout} \