Compare commits

..

30 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
9ef47dea89 .gitea/workflows/build_nopush.yml aktualisiert 2024-09-26 11:41:33 +00:00
569ba188c8 Merge pull request 'devel' (#2) from devel into main
Reviewed-on: #2
2024-09-26 11:40:43 +00:00
3e728cdc53 Merge pull request 'entrypoint.sh aktualisiert' (#1) from main into devel
Reviewed-on: #1
2024-09-26 11:40:12 +00:00
a207812ac2 tag 16-20240926.1
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 15s
2024-09-26 12:31:52 +02:00
7404c49d5e <type>[optional scope]: <description>
[optional body]

[Ticket: no]
2024-09-26 12:31:22 +02:00
918b5300a1 last test run
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 16s
2024-09-26 12:29:32 +02:00
45d309f2a2 last test run 2024-09-26 12:29:13 +02:00
5bf2dfa37c ghgh
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 15s
2024-09-26 12:27:24 +02:00
d79ca90459 d 2024-09-26 12:27:09 +02:00
198633584e tst
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 20s
2024-09-26 12:25:00 +02:00
9479f5854d no 2024-09-26 12:24:43 +02:00
7c8be88bb3 <type>[optional scope]: <description>
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 27s
[optional body]

[Ticket: no]
2024-09-26 12:19:40 +02:00
04307162cc <type>[optional scope]: <description>
[optional body]

[Ticket: no]
2024-09-26 12:19:18 +02:00
7695265bd3 <type>[optional scope]: <description>
Some checks failed
Create postgresql docker image / Explore-Gitea-Actions (push) Failing after 11s
[optional body]

[Ticket: no]
2024-09-26 12:10:57 +02:00
819933cca1 change 2024-09-26 12:10:21 +02:00
e15ca89c3e <type>[optional scope]: <description>
Some checks failed
Create postgresql docker image / Explore-Gitea-Actions (push) Failing after 18s
[optional body]

[Ticket: no]
2024-09-26 12:05:14 +02:00
f71f796a58 change workflow script 2024-09-26 12:03:06 +02:00
2514632d3b change apk update command
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 25s
2024-09-26 11:36:41 +02:00
3 changed files with 29 additions and 8 deletions

View File

@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on:
push:
branches:
- devel
- main
paths:
- "Dockerfile"
@ -11,8 +11,9 @@ jobs:
Explore-Gitea-Actions:
runs-on: ubuntu-latest
env:
REGISTRY: registry.tuxnet.lan
REGISTRY: git.cooltux.net
IMAGE: db/pg_dump
DOCKER_ORG: ${{ secrets.DOCKER_USERNAME }}
steps:
- name: Checkout
uses: actions/checkout@v3
@ -24,9 +25,22 @@ jobs:
uses: docker/setup-buildx-action@v2
with: # replace it with your local IP
config-inline: |
[registry."registry.tuxnet.lan"]
http = true
insecure = true
[registry."git.cooltux.net"]
http = false
insecure = false
- name: Login to DockerHub
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }} # replace it with your local IP
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Get Meta
id: meta
run: |
echo REPO_NAME=$(echo ${GITHUB_REPOSITORY} | awk -F"/" '{print $2}') >> $GITHUB_OUTPUT
# echo REPO_VERSION=$(git describe --tags --always | sed 's/^v//') >> $GITHUB_OUTPUT
- name: Set Docker Version
id: get_version
@ -43,4 +57,5 @@ jobs:
platforms: |
linux/amd64
push: false
tags: ${{ env.REGISTRY }}/${{ env.IMAGE }}:${{ steps.get_version.outputs.tag }}
tags: |
${{ env.REGISTRY }}/${{ env.DOCKER_ORG }}/${{ steps.meta.outputs.REPO_NAME }}:${{ steps.get_version.outputs.tag }}

View File

@ -4,9 +4,12 @@ LABEL maintainer="development@cooltux.net"
ARG VERSION=16-20240926
# PostgreSQL-Client installieren
RUN apk update ; \
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"