Commit 4f1d4b34 authored by Pedro Eduardo Trujillo's avatar Pedro Eduardo Trujillo
Browse files

Evita escribir sobre el fichero config original

parent 1b666319
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
#!/bin/sh -e

cat /etc/prometheus/prometheus-conf.yml > /tmp/prometheus.yml

if [ ${JOBS+x} ]
then
	for job in $(echo "${JOBS}" | tr ',' ' ')
@@ -41,7 +43,7 @@ then
	done
fi

cp /tmp/prometheus.yml /etc/prometheus/prometheus.yml
mv /tmp/prometheus.yml /etc/prometheus/prometheus.yml

set -- /bin/prometheus "$@"

+1 −2
Original line number Diff line number Diff line
@@ -21,8 +21,7 @@ services:
      - prometheus:/prometheus
    configs:
      - source: prometheus-conf
        target: /tmp/prometheus.yml
        mode: 0444
        target: /etc/prometheus/prometheus-conf.yml
      - source: prometheus-entrypoint
        target: /etc/prometheus/entrypoint.sh
        mode: 0744