Compare commits

...

13 Commits

Author SHA1 Message Date
fcbdd3164a Merge pull request 'main' (#3) from main into devel
Reviewed-on: #3
2024-09-26 12:57:16 +00:00
d25dcc903f Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 15s
2024-09-26 12:40:54 +00:00
c423b2b801 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 31s
2024-09-26 12:32:28 +00:00
0a676b3f9d Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 15s
2024-09-26 12:25:19 +00:00
0d60d53f9f Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 15s
2024-09-26 12:21:26 +00:00
ba3cf572a0 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 31s
2024-09-26 12:15:22 +00:00
57871c9045 entrypoint.sh aktualisiert 2024-09-26 12:15:00 +00:00
a573b22911 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 27s
2024-09-26 12:02:29 +00:00
27419ee314 entrypoint.sh aktualisiert 2024-09-26 12:01:45 +00:00
07e602dee7 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 27s
2024-09-26 11:43:37 +00:00
75d2aee0db .gitea/workflows/build_nopush.yml aktualisiert 2024-09-26 11:43:23 +00:00
e9b17261c5 Dockerfile aktualisiert 2024-09-26 11:42:30 +00:00
569ba188c8 Merge pull request 'devel' (#2) from devel into main
Reviewed-on: #2
2024-09-26 11:40:43 +00:00
3 changed files with 9 additions and 3 deletions

View File

@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- devel
- main
paths:
- "Dockerfile"

View File

@ -1,12 +1,15 @@
FROM alpine:latest
LABEL maintainer="development@cooltux.net"
ARG VERSION=16-20240926.1
ARG VERSION=16-20240926
# PostgreSQL-Client installieren
RUN apk update --no-cache ; \
apk add --no-cache postgresql16-client
# Erstelle einen Benutzer mit UID 26
RUN adduser -u 1000 -D -S backupuser
# Arbeitsverzeichnis erstellen
WORKDIR /backup
@ -16,5 +19,8 @@ COPY entrypoint.sh /usr/local/bin/entrypoint.sh
# Skript ausführbar machen
RUN chmod +x /usr/local/bin/entrypoint.sh
# Wechsle den Benutzer auf den erstellten Benutzer mit UID 26
USER 1000
# Festlegen des EntryPoints für das Docker-Image
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]

View File

@ -13,7 +13,7 @@ echo "$PGHOST:5432:$PGDATABASE:$PGUSER:$PGPASSWORD" > ~/.pgpass
chmod 600 ~/.pgpass
# Optional: Standardwert für den Dateinamen der Sicherung
BACKUP_FILE=${BACKUP_FILE:-"/backup/$PGDATABASE_$(date +%Y%m%d_%H%M%S).sql"}
BACKUP_FILE=${BACKUP_FILE:-"/backup/$(echo $PGDATABASE)DB_$(date +%d-%m-%Y).sql"}
# Führe den pg_dump-Befehl aus (pg_dump wird automatisch die .pgpass-Datei verwenden)
pg_dump -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" -F c -f "$BACKUP_FILE"