3 Commits
1.0.25 ... main

4 changed files with 19 additions and 10 deletions

1
.gitignore vendored
View File

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

View File

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

View File

@@ -1,6 +1,9 @@
services:
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
restart: always
volumes:

View File

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