OP#176 edit start.sh
This commit is contained in:
@@ -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:
|
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.
|
||||||
|
|||||||
6
start.sh
6
start.sh
@@ -1,5 +1,7 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
if [[ "${DATABASE_URL}" == "" ]]; then
|
if [[ "${DATABASE_URL}" == "" ]]; then
|
||||||
echo 'Missing DATABASE_URL'
|
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>"'
|
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}"
|
pg_threads="${pg_threads:-1}"
|
||||||
parser_threads="${parser_threads:-5}"
|
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} \
|
--adapter-send-timeout=${adapter_send_timeout} \
|
||||||
--web-listen-address=${web_listen_address} \
|
--web-listen-address=${web_listen_address} \
|
||||||
--web-telemetry-path=${web_telemetry_path} \
|
--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-secs=${pg_commit_secs} \
|
||||||
--pg-commit-rows=${pg_commit_rows} \
|
--pg-commit-rows=${pg_commit_rows} \
|
||||||
--pg-threads=${pg_threads} \
|
--pg-threads=${pg_threads} \
|
||||||
--parser-threads=${parser_threads}
|
--parser-threads=${parser_threads}"
|
||||||
|
|
||||||
/usr/local/bin/postgresql-prometheus-adapter \
|
/usr/local/bin/postgresql-prometheus-adapter \
|
||||||
--adapter-send-timeout=${adapter_send_timeout} \
|
--adapter-send-timeout=${adapter_send_timeout} \
|
||||||
|
|||||||
Reference in New Issue
Block a user