diff --git a/env.sh.template b/env.sh.template index d9248ba..9ccdb73 100755 --- a/env.sh.template +++ b/env.sh.template @@ -3,4 +3,5 @@ # https://prometheus.io/docs/prometheus/latest/storage/#operational-aspects 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" diff --git a/start.sh b/start.sh index 2e8f32b..47e5cc7 100755 --- a/start.sh +++ b/start.sh @@ -2,7 +2,10 @@ 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 echo "=> Creating config file on first run" @@ -20,7 +23,7 @@ fi # migration remove in next release 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 echo "=> Source custom variables for cli args"