Compare commits

..

36 Commits

Author SHA1 Message Date
4a69a4f8a3 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 23s
2024-11-29 12:45:56 +00:00
810c70eb9a Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 30s
2024-10-11 08:11:26 +00:00
b664d39a04 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 26s
2024-09-26 18:54:25 +00:00
956eda1018 entrypoint.sh aktualisiert 2024-09-26 18:53:44 +00:00
150ae93fe7 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 27s
2024-09-26 13:13:01 +00:00
e640923835 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 22s
2024-09-26 13:08:20 +00:00
aefc4b01f3 Dockerfile aktualisiert
All checks were successful
Create postgresql docker image / Explore-Gitea-Actions (push) Successful in 21s
2024-09-26 12:59:26 +00:00
2e31fb067e .gitea/workflows/build.yml aktualisiert 2024-09-26 12:58:22 +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
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 34 additions and 11 deletions

View File

@ -3,7 +3,7 @@ run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
on: on:
push: push:
branches: branches:
- devel - main
paths: paths:
- "Dockerfile" - "Dockerfile"
@ -11,8 +11,9 @@ jobs:
Explore-Gitea-Actions: Explore-Gitea-Actions:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
REGISTRY: registry.tuxnet.lan REGISTRY: git.cooltux.net
IMAGE: db/pg_dump IMAGE: db/pg_dump
DOCKER_ORG: ${{ secrets.DOCKER_USERNAME }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@ -24,9 +25,22 @@ jobs:
uses: docker/setup-buildx-action@v2 uses: docker/setup-buildx-action@v2
with: # replace it with your local IP with: # replace it with your local IP
config-inline: | config-inline: |
[registry."registry.tuxnet.lan"] [registry."git.cooltux.net"]
http = true http = false
insecure = true 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 - name: Set Docker Version
id: get_version id: get_version
@ -42,5 +56,6 @@ jobs:
file: ./Dockerfile file: ./Dockerfile
platforms: | platforms: |
linux/amd64 linux/amd64
push: false push: true
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

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

View File

@ -13,7 +13,7 @@ echo "$PGHOST:5432:$PGDATABASE:$PGUSER:$PGPASSWORD" > ~/.pgpass
chmod 600 ~/.pgpass chmod 600 ~/.pgpass
# Optional: Standardwert für den Dateinamen der Sicherung # 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) # 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" pg_dump -h "$PGHOST" -U "$PGUSER" -d "$PGDATABASE" -F c -f "$BACKUP_FILE"
@ -25,3 +25,5 @@ else
echo "Fehler bei der Sicherung der Datenbank" echo "Fehler bei der Sicherung der Datenbank"
exit 1 exit 1
fi fi
exit 0