- Default TZ=Africa/Nairobi baked into the sidecar image; override via compose TZ env var if another region is ever needed. - Rename BACKUP_TIMES_UTC → BACKUP_TIMES (legacy var still honored for back-compat). Times are now interpreted in the container's local TZ, so "02:30" means 02:30 EAT, not UTC. - Log timestamps and dump filenames use %FT%T%z / %Y%m%d_%H%M%S_%Z (e.g. tracksolid_db_20260424_115729_EAT.sql.gz) so the TZ is visible on every artifact. - Prune cutoff computed in local time; YYYYMMDD regex unchanged so it still matches legacy UTC filenames during the transition. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
19 lines
423 B
Docker
19 lines
423 B
Docker
FROM alpine:3.20
|
|
|
|
RUN apk add --no-cache \
|
|
postgresql16-client \
|
|
aws-cli \
|
|
gzip \
|
|
tzdata \
|
|
bash \
|
|
coreutils
|
|
|
|
# Default TZ for timestamps and schedule interpretation. Override via compose env.
|
|
ENV TZ=Africa/Nairobi
|
|
|
|
WORKDIR /app
|
|
COPY backup_db.sh /app/backup_db.sh
|
|
COPY entrypoint.sh /app/entrypoint.sh
|
|
RUN chmod +x /app/backup_db.sh /app/entrypoint.sh
|
|
|
|
ENTRYPOINT ["/app/entrypoint.sh"]
|