Files
omsorg/omsorgapp/docker-entrypoint.sh
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

12 lines
441 B
Bash

#!/bin/sh
set -eu
# Schreibt die Laufzeit-Backend-Adresse in env-config.js, bevor nginx startet - siehe
# src/api/config.js. OMSORG_CORE_URL kommt aus docker-compose.yml, muss vom BROWSER erreichbar
# sein (nicht der interne Compose-Servicename), z.B. https://core.omsorg-pflegedienste.de.
cat > /usr/share/nginx/html/env-config.js <<EOF
window.__OMSORG_ENV__ = { OMSORG_CORE_URL: "${OMSORG_CORE_URL:-}" };
EOF
exec nginx -g "daemon off;"