2 Commits
1.0.26 ... main

4 changed files with 15 additions and 15 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

@@ -1,17 +1,12 @@
#!/bin/sh #!/bin/sh
set +e
# Create crontab in a writable location and set proper permissions # Create crontab in a writable location and set proper permissions
mkdir -p /tmp/crontabs echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh >> /proc/1/fd/1 2>&1" > /etc/crontabs/root
echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh" > /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
echo "Starting crond with config:"
cat /tmp/crontabs/root
echo "---"
# Start crond in foreground with debug output # Start crond in foreground with debug output
exec crond -f -c /tmp/crontabs -d 8 exec crond -f -d 0