Skip to content
This repository was archived by the owner on Jun 21, 2025. It is now read-only.

Go cron 0.0.10, update alpine #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

services:
postgres:
image: postgres:14
image: postgres:16
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
Expand All @@ -12,11 +12,11 @@ services:
build:
context: .
args:
ALPINE_VERSION: '3.16'
ALPINE_VERSION: "3.20"
environment:
SCHEDULE: '@weekly' # optional
BACKUP_KEEP_DAYS: 7 # optional
PASSPHRASE: passphrase # optional
SCHEDULE: "@weekly" # optional
BACKUP_KEEP_DAYS: 7 # optional
PASSPHRASE: passphrase # optional
S3_REGION:
S3_ACCESS_KEY_ID:
S3_SECRET_ACCESS_KEY:
Expand Down
8 changes: 4 additions & 4 deletions src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ set -o pipefail

apk update

# install tzdata
apk add --no-cache tzdata

# install pg_dump
apk add postgresql-client

Expand All @@ -15,10 +18,7 @@ apk add aws-cli

# install go-cron
apk add curl
curl -L https://github.com/ivoronin/go-cron/releases/download/v0.0.5/go-cron_0.0.5_linux_${TARGETARCH}.tar.gz -O
tar xvf go-cron_0.0.5_linux_${TARGETARCH}.tar.gz
rm go-cron_0.0.5_linux_${TARGETARCH}.tar.gz
mv go-cron /usr/local/bin/go-cron
curl --fail --retry 4 --retry-all-errors -L https://github.com/prodrigestivill/go-cron/releases/download/v0.0.10/go-cron-linux-$TARGETARCH-static.gz | zcat > /usr/local/bin/go-cron
chmod u+x /usr/local/bin/go-cron
apk del curl

Expand Down
2 changes: 1 addition & 1 deletion src/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ fi
if [ -z "$SCHEDULE" ]; then
sh backup.sh
else
exec go-cron "$SCHEDULE" /bin/sh backup.sh
exec go-cron -s "$SCHEDULE" -p 0 -- /bin/sh backup.sh
fi