/app/data changes must happen at runtime

This commit is contained in:
Girish Ramakrishnan 2020-11-10 16:13:46 -08:00
parent adea1905ab
commit 0956729298
2 changed files with 4 additions and 5 deletions

View file

@ -1,10 +1,5 @@
FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4 FROM cloudron/base:2.0.0@sha256:f9fea80513aa7c92fe2e7bf3978b54c8ac5222f47a9a32a7f8833edf0eb5a4f4
RUN mkdir -p /app/data/runtime /app/data/config && \
chown -R cloudron:cloudron /app/data/runtime /app/data/config
WORKDIR /app/data
# install Prometheus # install Prometheus
RUN mkdir -p /usr/local/bin/prometheus && \ RUN mkdir -p /usr/local/bin/prometheus && \
cd /usr/local/bin && \ cd /usr/local/bin && \

View file

@ -2,6 +2,10 @@
set -eu set -eu
mkdir -p /app/data/runtime /app/data/config
chown -R cloudron:cloudron /app/data
echo "=> Starting Prometheus" echo "=> Starting Prometheus"
cd /usr/local/bin/prometheus cd /usr/local/bin/prometheus
exec /usr/local/bin/gosu cloudron:cloudron ./prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime exec /usr/local/bin/gosu cloudron:cloudron ./prometheus --config.file=/app/data/config/prometheus.yml --storage.tsdb.path=/app/data/runtime