Compare commits

...

36 commits
3.20.6 ... main

Author SHA1 Message Date
a82d1bb047 Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 8s
docker-build / cron (push) Successful in 8s
2025-06-22 14:47:11 +02:00
afda9d5414 Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Failing after 6s
docker-build / cron (push) Has been skipped
2025-06-22 14:45:49 +02:00
523b49acb1 Update .forgejo/workflows/build.yml 2025-06-22 14:45:30 +02:00
ecc81f1f12 Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Failing after 0s
docker-build / cron (push) Has been skipped
2025-06-22 14:40:21 +02:00
1a7829f6ed Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Failing after 1s
docker-build / cron (push) Has been skipped
2025-06-22 14:39:15 +02:00
ed0e028ade Update .forgejo/workflows/build.yml 2025-06-22 14:38:34 +02:00
b839662c83 Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Failing after 0s
docker-build / cron (push) Has been skipped
2025-06-22 14:37:03 +02:00
c77245ec85 Update .forgejo/workflows/docker-build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Failing after 0s
docker-build / cron (push) Has been skipped
2025-06-22 14:36:05 +02:00
bb42d0c786 Merge pull request 'Add .forgejo/workflows/docker-build.yml' (#2) from holzi1005-patch-1 into main
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Failing after 0s
docker-build / cron (push) Has been skipped
Reviewed-on: #2
2025-06-22 14:34:16 +02:00
30c682209a Update .forgejo/workflows/build.yml 2025-06-22 14:33:49 +02:00
fbceb71ab4 Add .forgejo/workflows/docker-build.yml 2025-06-22 14:31:47 +02:00
a70d9e73dc Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / docker-build (alpine-php8-webserver) (push) Has been cancelled
docker-build / docker-build (alpine-php8-cron-webserver) (push) Has been cancelled
2025-06-22 14:27:13 +02:00
173ee39e69 Update rootfs/etc/nginx/nginx.conf
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 10s
docker-build / cron (push) Successful in 13s
2025-06-22 12:10:37 +02:00
21865b2684 Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 6s
docker-build / webserver (push) Successful in 8s
docker-build / cron (push) Successful in 9s
2025-06-22 11:47:40 +02:00
8ed1b9a778 Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 8s
docker-build / cron (push) Successful in 13s
2025-06-22 11:45:31 +02:00
ab108102d4 Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 9s
docker-build / cron (push) Successful in 8s
2025-06-22 11:34:46 +02:00
d44760b02e Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 9s
docker-build / cron (push) Successful in 8s
2025-06-22 11:31:18 +02:00
9606857714 Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 8s
docker-build / cron (push) Successful in 9s
2025-06-22 11:22:14 +02:00
8ccd3b3d6f Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 9s
docker-build / cron (push) Failing after 7s
2025-06-22 11:20:29 +02:00
b9045f12f9 Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 9s
docker-build / cron (push) Failing after 25s
2025-06-22 11:18:08 +02:00
539e845ad0 Update .forgejo/workflows/build.yml
Some checks failed
docker-build / release (push) Successful in 5s
docker-build / webserver (push) Successful in 9s
docker-build / cron (push) Failing after 39s
2025-06-22 11:11:05 +02:00
db37c3fb1b Update rootfs/etc/nginx/nginx.conf
All checks were successful
docker-build / release (push) Successful in 6s
docker-build / docker-build (push) Successful in 15s
2025-06-22 11:00:34 +02:00
c750cba136 Update rootfs/etc/nginx/nginx.conf
All checks were successful
docker-build / release (push) Successful in 5s
docker-build / docker-build (push) Successful in 10s
2025-06-22 10:51:31 +02:00
ec9fcb7842 Update .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 6s
docker-build / docker-build (push) Successful in 10s
2025-06-22 10:39:33 +02:00
157ac30d4e Add .forgejo/workflows/build.yml
All checks were successful
docker-build / release (push) Successful in 6s
docker-build / docker-build (push) Successful in 22s
2025-06-22 09:37:58 +02:00
2d073376d1 Update rootfs/etc/nginx/nginx.conf 2025-06-22 09:22:23 +02:00
e989738aa6 add pm_mode as env 2025-02-28 15:39:17 +01:00
e0f21268b0 update www php-fpm config 2025-02-28 15:21:09 +01:00
4b6ae8ef13 fix dockerfile 2025-02-28 14:42:50 +01:00
8d30dd70a2 Merge pull request 'increase pm ressources' (#1) from hotfix/increase-pm_worker into main
Reviewed-on: #1
Reviewed-by: emanuel.holzmann <emanuel.holzmann@noreply.localhost>
2025-02-28 14:36:59 +01:00
d11499928f Merge branch 'main' into hotfix/increase-pm_worker 2025-02-28 10:41:43 +01:00
75b588935f increase pm ressources 2025-02-28 10:35:05 +01:00
8bfa18d40d Update rootfs/etc/nginx/nginx.conf 2025-02-02 15:05:41 +01:00
1decdf0f03 Add rootfs/docker-entrypoint-init.d/99-startup-commands.sh 2025-01-23 22:19:51 +01:00
209e4f3ac1 Delete rootfs/docker-entrypoint-init.d/01-uname.sh 2025-01-23 22:12:09 +01:00
cbfb42db6f remove workflows 2024-12-08 13:59:43 +01:00
9 changed files with 190 additions and 125 deletions

View file

@ -0,0 +1,107 @@
name: docker-build
on:
push:
branches:
- main
permissions: write-all
jobs:
release:
runs-on: docker
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Define next tag
uses: https://github.com/paulhatch/semantic-version@v5.0.2
id: version
with:
tag_prefix: ""
major_pattern: "(MAJOR)"
minor_pattern: "(MINOR)"
change_path: .
version_format: "${major}.${minor}.${patch}"
- name: Create tag
run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
git tag "${{ steps.version.outputs.version }}" -m "[forgejo-action-tag]"
git push origin --tags
webserver:
env:
REPO_NAME: alpine-php8-webserver
needs:
- release
outputs:
version: ${{ needs.release.outputs.version }}
runs-on: host
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
github-server-url: https://git.h2-invent.com
repository: Public-System-Design/${{ env.REPO_NAME }}
ref: main
path: ${{ env.REPO_NAME }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.h2-invent.com
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./${{ env.REPO_NAME }}
push: true
tags: |
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:${{ needs.release.outputs.version }}
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:latest
build-args: |
VERSION=${{ needs.release.outputs.version }}
cron:
env:
REPO_NAME: alpine-php8-cron-webserver
needs:
- webserver
runs-on: host
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
github-server-url: https://git.h2-invent.com
repository: Public-System-Design/${{ env.REPO_NAME }}
ref: main
path: ${{ env.REPO_NAME }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.h2-invent.com
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./${{ env.REPO_NAME }}
push: true
tags: |
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:${{ needs.webserver.outputs.version }}
git.h2-invent.com/public-system-design/${{ env.REPO_NAME }}:latest
build-args: |
VERSION=${{ needs.webserver.outputs.version }}

View file

@ -0,0 +1,40 @@
name: Build and Push Image
description: Builds and pushes a Docker image.
inputs:
repo_name:
description: "Name of the repo (also used as build context path)"
required: true
version:
description: "Version tag"
required: true
jobs:
build:
runs-on: host
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
github-server-url: https://git.h2-invent.com
repository: Public-System-Design/${{ inputs.repo_name }}
ref: main
path: ${{ inputs.repo_name }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
registry: git.h2-invent.com
username: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_USER }}
password: ${{ secrets.FORGEJO_ACTION_PACKAGE_RW_KEY }}
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: ./${{ inputs.repo_name }}
push: true
tags: |
git.h2-invent.com/public-system-design/${{ inputs.repo_name }}:${{ inputs.version }}
git.h2-invent.com/public-system-design/${{ inputs.repo_name }}:latest
build-args: |
VERSION=${{ inputs.version }}

View file

@ -1,12 +0,0 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "docker" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"

View file

@ -1,105 +0,0 @@
name: buildx
on:
push:
pull_request:
jobs:
buildx:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code
- name: Checkout
uses: actions/checkout@v4
# Step 2: Prepare variables for building and tagging the image
- name: Prepare
id: prepare
run: |
GHCR_IMAGE=ghcr.io/${GITHUB_REPOSITORY}
DOCKER_PLATFORMS=linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/386,linux/ppc64le,linux/s390x
VERSION=$(echo ${GITHUB_REF#refs/*/} | sed 's/\//-/g') # Replace / with - in tag name
TAGS="${GITHUB_REPOSITORY}:${VERSION}"
if [[ $GITHUB_REF == refs/tags/* ]]; then
TAGS="$TAGS,${GITHUB_REPOSITORY}:latest"
elif [[ $VERSION == "master" ]]; then
TAGS="$TAGS,${GITHUB_REPOSITORY}:beta"
fi
GHCR_TAGS="${GHCR_IMAGE}:${VERSION}"
if [[ $GITHUB_REF == refs/tags/* ]]; then
GHCR_TAGS="$GHCR_TAGS,${GHCR_IMAGE}:latest"
elif [[ $VERSION == "master" ]]; then
GHCR_TAGS="$GHCR_TAGS,${GHCR_IMAGE}:beta"
fi
echo "platforms=${DOCKER_PLATFORMS}" >> $GITHUB_OUTPUT
echo "tags=${TAGS}" >> $GITHUB_OUTPUT
echo "ghcr-tags=${GHCR_TAGS}" >> $GITHUB_OUTPUT
# Step 3: Set up QEMU for multi-platform builds
- name: Set up QEMU
id: qemu
uses: docker/setup-qemu-action@v3
with:
image: tonistiigi/binfmt:latest
platforms: all
# Step 4: Set up Docker Buildx
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
# Step 5: Login to DockerHub
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Step 5.5: Login to GitHub Container Registry
- name: Login to GHCR
if: github.event_name != 'pull_request'
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# Step 6: Debug Build
- name: Debug Build on PR
run: |
docker buildx build --load .
# Step 7: Test the built image
- name: Test
run: |
docker compose version
docker compose --file docker-compose.test.yml up --exit-code-from sut --timeout 10 --build
# Step 8: Build and Push (if not a PR)
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.prepare.outputs.tags }}
platforms: ${{ steps.prepare.outputs.platforms }}
# Step 9: Push to GitHub Container Registry
- name: Push to GHCR
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ steps.prepare.outputs.ghcr-tags }}
platforms: ${{ steps.prepare.outputs.platforms }}
# Step 10: Update Docker Hub Description
- name: Docker Hub Description
if: startsWith(github.ref, 'refs/tags/')
uses: peter-evans/dockerhub-description@v4
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}
short-description: ${{ github.event.repository.description }}

View file

@ -87,8 +87,14 @@ ENTRYPOINT ["/bin/docker-entrypoint.sh"]
HEALTHCHECK --timeout=10s CMD curl --silent --fail http://127.0.0.1:8080/fpm-ping || exit 1
ENV nginx_root_directory=/var/www/html/public \
nginx_fastcgi_read_timeout=100 \
client_max_body_size=2M \
clear_env=no \
pm_mode=dynamic \
pm_start_servers=20 \
pm_min_spare_servers=10 \
pm_max_spare_servers=20 \
pm_max_requests=1000 \
allow_url_fopen=On \
allow_url_include=Off \
display_errors=Off \

View file

@ -1,3 +0,0 @@
#!/bin/sh
# Test file to check init scripts
uname -a

View file

@ -0,0 +1,19 @@
#!/bin/sh
# Zähler für die Befehle
i=0
# Schleife, um die Befehle aus den Umgebungsvariablen zu lesen
while :; do
# Dynamische Umgebungsvariable aufbauen
cmd_var="STARTUP_COMMAND_$i"
# Überprüfen, ob die Umgebungsvariable gesetzt ist
if [ -n "${!cmd_var}" ]; then
echo "Führe Befehl $i aus: ${!cmd_var}"
eval "${!cmd_var}"
i=$((i + 1)) # Zähler erhöhen
else
break # Schleife beenden, wenn keine weitere Variable gesetzt ist
fi
done

View file

@ -57,9 +57,7 @@ http {
index index.php index.html;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.php
try_files $uri $uri/ /index.php?q=$uri&$args;
try_files $uri /index.php$is_args$args;
}
# Redirect server error pages to the static page /50x.html
@ -68,19 +66,31 @@ http {
root /var/lib/nginx/html;
}
location ^~ /theme/ {
alias /var/www/html/public/theme/;
add_header 'Access-Control-Allow-Origin' '*' always;
expires 30d;
access_log off;
try_files $uri =404;
}
# Pass the PHP scripts to PHP-FPM listening on socket
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php-fpm.sock;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_index index.php;
fastcgi_read_timeout ${nginx_fastcgi_read_timeout};
include fastcgi_params;
# Pass the original forwarded_scheme and HTTPS status to the PHP backend
fastcgi_param HTTP_X_FORWARDED_PROTO $forwarded_scheme;
fastcgi_param HTTPS $https if_not_empty;
internal;
}

View file

@ -34,7 +34,7 @@ listen.group = nobody
pm.status_path = /fpm-status
; Ondemand process manager
pm = ondemand
pm = $pm_mode
; The number of child processes to be created when pm is set to 'static' and the
; maximum number of child processes when pm is set to 'dynamic' or 'ondemand'.
@ -46,6 +46,9 @@ pm = ondemand
; Note: Used when pm is set to 'static', 'dynamic' or 'ondemand'
; Note: This value is mandatory.
pm.max_children = 100
pm.start_servers = $pm_start_servers
pm.min_spare_servers = $pm_min_spare_servers
pm.max_spare_servers = $pm_max_spare_servers
; The number of seconds after which an idle process will be killed.
; Note: Used only when pm is set to 'ondemand'
@ -56,7 +59,7 @@ pm.process_idle_timeout = 10s;
; This can be useful to work around memory leaks in 3rd party libraries. For
; endless request processing specify '0'. Equivalent to PHP_FCGI_MAX_REQUESTS.
; Default Value: 0
pm.max_requests = 1000
pm.max_requests = $pm_max_requests
; Make sure the FPM workers can reach the environment variables for configuration
clear_env = $clear_env