Files
backupbot/Dockerfile
Chris Cowan 4476c02354
All checks were successful
Build and Push Docker Image / build (push) Successful in 47s
force the ENV
2025-10-22 01:03:35 -07:00

43 lines
1.1 KiB
Docker

# Use LinuxServer.io Duplicati base
FROM linuxserver/duplicati:2.1.0
# Install Docker CLI, bash, python3
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
bash \
python3 \
python3-pip \
docker.io \
btrfs-progs \
ca-certificates curl && \
rm -rf /var/lib/apt/lists/*
# Create directories for backup scripts and logs
RUN mkdir -p /usr/local/bin /config/log /config/web /etc/services.d/backupbot
# Copy backup script
COPY backup.sh /usr/local/bin/backup.sh
RUN chmod +x /usr/local/bin/backup.sh
# Copy s6 service for backupbot
COPY services/backupbot/run /etc/services.d/backupbot/run
RUN chmod +x /etc/services.d/backupbot/run
# Copy web frontend
COPY web /defaults/web
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"]