1 Commits

4 changed files with 13 additions and 8 deletions

1
.gitignore vendored
View File

@@ -1,2 +1,3 @@
.idea .idea
.env .env
var/*

View File

@@ -1,17 +1,18 @@
FROM alpine:latest FROM alpine:3.19
ENV TZ=UTC ENV TZ=UTC
LABEL maintainer="Vassiliy Yegorov <vasyakrg@gmail.com>" LABEL maintainer="Vassiliy Yegorov <vasyakrg@gmail.com>"
RUN apk add --no-cache \ RUN apk add --no-cache \
sqlite \ sqlite \
curl \ wget \
bash \ bash \
tzdata \ tzdata \
openssl openssl \
&& rm -rf /var/cache/apk/*
RUN curl -O https://downloads.rclone.org/rclone-current-linux-amd64.zip && \ RUN wget https://github.com/rclone/rclone/releases/download/v1.71.0/rclone-v1.71.0-linux-amd64.zip && \
unzip rclone-current-linux-amd64.zip && \ unzip rclone-v1.71.0-linux-amd64.zip && \
cd rclone-*-linux-amd64 && \ cd rclone-*-linux-amd64 && \
cp rclone /usr/bin/ && \ cp rclone /usr/bin/ && \
chown root:root /usr/bin/rclone && \ chown root:root /usr/bin/rclone && \

View File

@@ -1,6 +1,9 @@
services: services:
sqlite_backup: sqlite_backup:
image: git.realmanual.ru/pub/sqlite-backup/backup:latest # image: git.realmanual.ru/pub/sqlite-backup/backup:latest
build:
context: .
dockerfile: Dockerfile
container_name: sqlite_backup container_name: sqlite_backup
restart: always restart: always
volumes: volumes:

View File

@@ -2,11 +2,11 @@
# Create crontab in a writable location and set proper permissions # Create crontab in a writable location and set proper permissions
mkdir -p /tmp/crontabs mkdir -p /tmp/crontabs
echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh" > /tmp/crontabs/root echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh >> /proc/1/fd/1 2>&1" > /tmp/crontabs/root
chmod 644 /tmp/crontabs/root chmod 644 /tmp/crontabs/root
# Run initial backup # Run initial backup
/scripts/backup.sh # /scripts/backup.sh
# Start crond with debug output # Start crond with debug output
echo "Starting crond with config:" echo "Starting crond with config:"