mirror of
https://git.cloudron.io/cloudron/prometheus-server-app.git
synced 2024-12-28 10:00:32 +00:00
Merge branch 'feature/start-options' into 'master'
Feature/start options - add storage.tsdb.retention.time See merge request cloudron/prometheus-server-app!3
This commit is contained in:
commit
fe72ecea92
4 changed files with 21 additions and 8 deletions
|
@ -8,6 +8,6 @@ ARG VERSION=2.30.3
|
|||
# install Prometheus
|
||||
RUN curl -L https://github.com/prometheus/prometheus/releases/download/v${VERSION}/prometheus-${VERSION}.linux-amd64.tar.gz | tar zxvf - --strip-components 1
|
||||
|
||||
COPY start.sh /app/pkg/
|
||||
COPY docker /
|
||||
|
||||
CMD [ "/app/pkg/start.sh" ]
|
||||
|
|
4
docker/app/code/default_prometheus_variables.sh
Executable file
4
docker/app/code/default_prometheus_variables.sh
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
# https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
|
||||
export retention_time="15d"
|
|
@ -11,5 +11,14 @@ fi
|
|||
|
||||
chown -R cloudron:cloudron /app/data
|
||||
|
||||
if [ ! -f /app/data/prometheus_variables.sh ]; then
|
||||
echo "=> Copy default prometheus variable file since it does not exist"
|
||||
cp /app/code/default_prometheus_variables.sh /app/data/prometheus_variables.sh
|
||||
fi
|
||||
|
||||
echo "=> Source custom variables"
|
||||
source /app/data/prometheus_variables.sh
|
||||
|
||||
echo "=> Starting Prometheus"
|
||||
exec /usr/local/bin/gosu cloudron:cloudron /app/code/prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime
|
||||
echo "=> Starting with retention time of $retention_time"
|
||||
exec /usr/local/bin/gosu cloudron:cloudron /app/code/prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime --storage.tsdb.retention.time="${retention_time:-15d}"
|
12
test/package-lock.json
generated
12
test/package-lock.json
generated
|
@ -33,9 +33,9 @@
|
|||
"integrity": "sha512-8UT/J+xqCYfn3fKtOznAibsHpiuDshCb0fwgWxRazTT19Igp9ovoXMPhXyLD6m3CKQGTMHgqoxaFfMWaL40Rnw=="
|
||||
},
|
||||
"@types/node": {
|
||||
"version": "16.10.1",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.1.tgz",
|
||||
"integrity": "sha512-4/Z9DMPKFexZj/Gn3LylFgamNKHm4K3QDi0gz9B26Uk0c8izYf97B5fxfpspMNkWlFupblKM/nV8+NA9Ffvr+w==",
|
||||
"version": "16.10.3",
|
||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-16.10.3.tgz",
|
||||
"integrity": "sha512-ho3Ruq+fFnBrZhUYI46n/bV2GjwzSkwuT4dTf0GkuNFmnb8nq4ny2z9JEVemFi6bdEJanHLlYfy9c6FN9B9McQ==",
|
||||
"optional": true
|
||||
},
|
||||
"@types/yauzl": {
|
||||
|
@ -617,9 +617,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"is-glob": {
|
||||
"version": "4.0.2",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.2.tgz",
|
||||
"integrity": "sha512-ZZTOjRcDjuAAAv2cTBQP/lL59ZTArx77+7UzHdWW/XB1mrfp7DEaVpKmZ0XIzx+M7AxfhKcqV+nMetUQmFifwg==",
|
||||
"version": "4.0.3",
|
||||
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
|
||||
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
|
||||
"requires": {
|
||||
"is-extglob": "^2.1.1"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue