mirror of
https://git.cloudron.io/cloudron/prometheus-server-app.git
synced 2024-11-23 17:01:04 +00:00
storage is better dir name than runtime
This commit is contained in:
parent
c35bfa6977
commit
e7c9398ecc
2 changed files with 7 additions and 3 deletions
|
@ -3,4 +3,5 @@
|
||||||
# https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
|
# https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects
|
||||||
export retention_time="15d"
|
export retention_time="15d"
|
||||||
|
|
||||||
export cli_options="--storage.tsdb.retention.time=$retention_time --storage.tsdb.path=/app/data/runtime"
|
# edit this variable for various startup options
|
||||||
|
export cli_options="--storage.tsdb.retention.time=$retention_time --storage.tsdb.path=/app/data/storage"
|
||||||
|
|
7
start.sh
7
start.sh
|
@ -2,7 +2,10 @@
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
|
|
||||||
mkdir -p /app/data/runtime /app/data/config
|
# migration remove in next release
|
||||||
|
[[ -d /app/data/runtime ]] && mv /app/data/runtime /app/data/storage
|
||||||
|
|
||||||
|
mkdir -p /app/data/storage /app/data/config
|
||||||
|
|
||||||
if [[ ! -f /app/data/config/prometheus.yml ]]; then
|
if [[ ! -f /app/data/config/prometheus.yml ]]; then
|
||||||
echo "=> Creating config file on first run"
|
echo "=> Creating config file on first run"
|
||||||
|
@ -20,7 +23,7 @@ fi
|
||||||
|
|
||||||
# migration remove in next release
|
# migration remove in next release
|
||||||
if ! grep -q cli_option /app/data/env.sh; then
|
if ! grep -q cli_option /app/data/env.sh; then
|
||||||
echo -e '\nexport cli_options="--storage.tsdb.retention.time=$retention_time --storage.tsdb.path=/app/data/runtime"' >> /app/data/env.sh
|
echo -e '\nexport cli_options="--storage.tsdb.retention.time=$retention_time --storage.tsdb.path=/app/data/storage"' >> /app/data/env.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "=> Source custom variables for cli args"
|
echo "=> Source custom variables for cli args"
|
||||||
|
|
Loading…
Reference in a new issue