force the ENV
All checks were successful
Build and Push Docker Image / build (push) Successful in 47s
All checks were successful
Build and Push Docker Image / build (push) Successful in 47s
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -19,9 +19,6 @@ RUN mkdir -p /usr/local/bin /config/log /config/web /etc/services.d/backupbot
|
||||
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 /defaults/backupbot.env
|
||||
|
||||
# Copy s6 service for backupbot
|
||||
COPY services/backupbot/run /etc/services.d/backupbot/run
|
||||
RUN chmod +x /etc/services.d/backupbot/run
|
||||
@@ -32,5 +29,14 @@ RUN chmod +x /defaults/web/backupbot.cgi
|
||||
# Expose web frontend port
|
||||
EXPOSE 8080
|
||||
|
||||
ENV TZ=America/Los_Angeles
|
||||
ENV BACKUP_DIR=/backups/postgres
|
||||
ENV LOG_FILE=/config/log/pgbackup.log
|
||||
ENV MAX_RETRIES=3
|
||||
ENV GOTIFY_URL=http://gotify.example.com
|
||||
ENV GOTIFY_TOKEN=your_gotify_token_here
|
||||
ENV BACKUP_HOUR=03
|
||||
ENV BACKUP_MINUTE=00
|
||||
|
||||
# Keep duplicati entrypoint
|
||||
ENTRYPOINT ["/init"]
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
TZ=America/Los_Angeles
|
||||
BACKUP_DIR=/backups/postgres
|
||||
LOG_FILE=/config/log/pgbackup.log
|
||||
MAX_RETRIES=3
|
||||
GOTIFY_URL=http://gotify.example.com
|
||||
GOTIFY_TOKEN=your_gotify_token_here
|
||||
BACKUP_HOUR=03
|
||||
BACKUP_MINUTE=00
|
||||
@@ -1,17 +1,5 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
set -e
|
||||
# Source env if available
|
||||
if [[ -f /config/backupbot.env ]]; then
|
||||
set -a
|
||||
source /config/backupbot.env
|
||||
set +a
|
||||
else
|
||||
echo "[INFO] copying env vars from defaults..."
|
||||
cp -r /defaults/backupbot.env /config/
|
||||
set -a
|
||||
source /config/backupbot.env
|
||||
set +a
|
||||
fi
|
||||
# Initialize default web interface if missing
|
||||
if [ ! -d /config/web ]; then
|
||||
echo "[INFO] Populating /config/web from defaults..."
|
||||
|
||||
Reference in New Issue
Block a user