From 300ad5b49c82994d28538190c7b7329381f55a81 Mon Sep 17 00:00:00 2001 From: Chris Cowan Date: Tue, 21 Oct 2025 01:02:47 -0700 Subject: [PATCH] docker layers are my enemy --- Dockerfile | 2 +- services/backupbot/run | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1d483c1..b9d1212 100644 --- a/Dockerfile +++ b/Dockerfile @@ -20,7 +20,7 @@ COPY backup.sh /usr/local/bin/backup.sh RUN chmod +x /usr/local/bin/backup.sh # Copy the environment variables for the config -COPY backupbot.env /config/backupbot.env +COPY backupbot.env /defaults/backupbot.env # Copy s6 service for backupbot COPY services/backupbot/run /etc/services.d/backupbot/run diff --git a/services/backupbot/run b/services/backupbot/run index 6655c5b..97e12bc 100644 --- a/services/backupbot/run +++ b/services/backupbot/run @@ -3,6 +3,10 @@ set -e # Source env if available if [[ -f /config/backupbot.env ]]; then export $(grep -v '^#' /config/backupbot.env | xargs) +else + echo "[INFO] copying env vars from defaults..." + cp -r /defaults/backupbot.env /config/ + export $(grep -V '^#' /config/backupbot.env) fi # Initialize default web interface if missing if [ ! -d /config/web ]; then