Files
faunosteo/docker/entrypoint.sh
T
Bastien ChanotandClaude Opus 4.6 2d6ed809e2 chore: rename Zoosteo → Faunosteo across entire project
Brand strings, config defaults, i18n dicts, PDF attachment metadata,
HTML titles, Docker container name, package name, repo URLs, deploy
paths, and all documentation updated. Git remote switched to
faunosteo.git. Domain URLs (zoosteo.fr) preserved — DNS update is
separate. 155/155 tests green.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-05-22 21:44:21 +02:00

28 lines
891 B
Bash

#!/bin/sh
# Injects runtime env vars into /usr/share/nginx/html/env.js
# which is loaded by index.html before the React bundle.
# Values come from Docker env vars (set via env_file in docker-compose.yml).
set -e
ENV_JS="/usr/share/nginx/html/env.js"
cat > "$ENV_JS" <<EOF
window.__APP_CONFIG__ = {
siteName: "${APP_SITE_NAME:-Faunosteo}",
brandName: "${APP_BRAND_NAME:-Faunosteo}",
footerName: "${APP_FOOTER_NAME:-Faunosteo}",
tagline: "${APP_TAGLINE:-Bilans d'ostéopathie animalière}"
};
EOF
echo "env.js written: APP_BRAND_NAME=${APP_BRAND_NAME:-Faunosteo}"
# Replace PORT placeholder in nginx config if needed
# (nginx:alpine supports envsubst via templates; we keep it explicit)
export PORT="${PORT:-8080}"
envsubst '${PORT}' < /etc/nginx/conf.d/default.conf > /tmp/nginx_default.conf
cp /tmp/nginx_default.conf /etc/nginx/conf.d/default.conf
exec nginx -g "daemon off;"