Add NFPM packaging recipe
All checks were successful
Cadoles/postgres-backup/pipeline/head This commit looks good
All checks were successful
Cadoles/postgres-backup/pipeline/head This commit looks good
This commit is contained in:
9
misc/ci/Dockerfile
Normal file
9
misc/ci/Dockerfile
Normal file
@ -0,0 +1,9 @@
|
||||
FROM alpine:3.15
|
||||
|
||||
RUN apk add --no-cache make git curl jq bash openssl
|
||||
|
||||
RUN curl -k https://forge.cadoles.com/Cadoles/Jenkins/raw/branch/master/resources/com/cadoles/common/add-letsencrypt-ca.sh | bash
|
||||
|
||||
RUN wget https://github.com/goreleaser/nfpm/releases/download/v2.20.0/nfpm_2.20.0_Linux_x86_64.tar.gz \
|
||||
&& tar -xzf nfpm_2.20.0_Linux_x86_64.tar.gz -C /usr/local/bin \
|
||||
&& chmod +x /usr/local/bin/nfpm
|
10
misc/packaging/postgres-backup.service
Normal file
10
misc/packaging/postgres-backup.service
Normal file
@ -0,0 +1,10 @@
|
||||
[Unit]
|
||||
Description=Run PostgreSQL backup
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/pg_backup_rotated.sh -c /etc/postgres-backup/pg_backup.conf
|
||||
User=postgres
|
||||
|
||||
[Install]
|
||||
WantedBy=default.target
|
9
misc/packaging/postgres-backup.timer
Normal file
9
misc/packaging/postgres-backup.timer
Normal file
@ -0,0 +1,9 @@
|
||||
[Unit]
|
||||
Description=Timer for periodic execution of postgres-backup service.
|
||||
|
||||
[Timer]
|
||||
OnCalendar=daily
|
||||
Persistent=true
|
||||
|
||||
[Install]
|
||||
WantedBy=timers.target
|
Reference in New Issue
Block a user