Files
omsorg/.gitea/workflows/docker-build.yml
T
Felix KemmlerandClaude Sonnet 5 dcc8ea1510
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 3s
Make omsorgapp's backend URL runtime-configurable, use dedicated API subdomain
- omsorgapp now reads the omsorgCore URL from a runtime env-config.js
  generated by the container entrypoint from OMSORG_CORE_URL, instead of
  only baking it in at image build time - docker-compose.yml pulls
  pre-built images from the registry, so a build-time-only value couldn't
  be changed without a rebuild.
- docker-compose.yml: omsorgCore gets its own subdomain
  (core.omsorg-pflegedienste.de) rather than being proxied under the
  frontend's domain - omsorgWeb never needs browser-side access to it
  anyway (server-side cURL only), and a dedicated API host is more
  future-proof without being any less secure (backend still only bound to
  127.0.0.1). Includes the nginx server-block snippet needed for the new
  subdomain.
- Drop the now-unused OMSORG_CORE_PUBLIC_URL build-arg wiring from the
  Gitea Actions workflow.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-10 18:14:32 +02:00

56 lines
1.6 KiB
YAML

name: Docker-Images bauen und veröffentlichen
on:
push:
branches: [main]
tags: ["v*"]
env:
REGISTRY: git.omsorg-pflegedienste.de
IMAGE_NAMESPACE: admin/omsorg
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: omsorgcore
dockerfile: omsorgCore/Dockerfile
build_args: ""
- image: omsorgapp
dockerfile: omsorgapp/Dockerfile
build_args: ""
- image: omsorgweb
dockerfile: omsorgWeb/Dockerfile
build_args: ""
steps:
- name: Code auschecken
uses: actions/checkout@v4
- name: Bei Registry anmelden
run: echo "${{ secrets.REGISTRY_TOKEN }}" | docker login ${{ env.REGISTRY }} -u "${{ gitea.actor }}" --password-stdin
- name: Image bauen und pushen
run: |
BUILD_ARGS=""
if [ -n "${{ matrix.build_args }}" ]; then
BUILD_ARGS="--build-arg ${{ matrix.build_args }}"
fi
IMAGE="${{ env.REGISTRY }}/${{ env.IMAGE_NAMESPACE }}/${{ matrix.image }}"
TAGS="-t $IMAGE:latest -t $IMAGE:${{ gitea.sha }}"
# Bei einem Tag-Push (z.B. v0.1.0) zusätzlich mit dem Tag-Namen selbst versionieren,
# damit ein bestimmter Release pinnbar bleibt statt nur :latest/:<sha>.
if [ "${{ gitea.ref_type }}" = "tag" ]; then
TAGS="$TAGS -t $IMAGE:${{ gitea.ref_name }}"
fi
docker buildx build \
--push \
-f "${{ matrix.dockerfile }}" \
$TAGS \
$BUILD_ARGS \
.