mirror of
https://github.com/offen/docker-volume-backup.git
synced 2024-11-25 14:40:28 +01:00
Run httpd server in container if requested
This commit is contained in:
parent
1c6f64e254
commit
f4138fd733
@ -13,7 +13,7 @@ FROM alpine:3.18
|
||||
|
||||
WORKDIR /root
|
||||
|
||||
RUN apk add --no-cache ca-certificates
|
||||
RUN apk add --no-cache ca-certificates busybox-extras
|
||||
|
||||
COPY --from=builder /app/cmd/backup/backup /usr/bin/backup
|
||||
COPY --chmod=755 ./entrypoint.sh /root/
|
||||
|
@ -22,5 +22,12 @@ else
|
||||
done
|
||||
fi
|
||||
|
||||
if [ ! -z "$SERVE_METRICS_PATH" ]; then
|
||||
mkdir -p /var/www/html${SERVE_METRICS_PATH}
|
||||
echo "ok" > /var/www/html${SERVE_METRICS_PATH}/metrics.txt
|
||||
httpd -h /var/www/html -p "${SERVE_METRICS_PORT:-80}"
|
||||
echo "Serving metrics on port ${SERVE_METRICS_PORT:-80}."
|
||||
fi
|
||||
|
||||
echo "Starting cron in foreground."
|
||||
crond -f -d 8
|
||||
|
Loading…
Reference in New Issue
Block a user