cms: Site beim Container-Start bauen (sonst 404 auf / vor erstem Publish)
public/ ist git-ignored und fehlt im frischen Clone — Entrypoint baut die Hugo-Site einmal aus content/. Ausserdem: Script-Output stellt klar, dass :8000 nur das API-Gateway ist (keine Web-UI). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
# Beim Container-Start die Hugo-Site einmal bauen, damit die Live-Seite (/)
|
||||
# sofort steht — auch vor dem ersten Publish. public/ ist git-ignored und
|
||||
# existiert im frischen Clone nicht; ohne diesen Build gäbe es 404 auf /.
|
||||
set -e
|
||||
|
||||
SITE_DIR="${SITE_DIR:-/site}"
|
||||
|
||||
echo "→ Initialer Hugo-Build ($SITE_DIR → public/)…"
|
||||
if hugo --source "$SITE_DIR" --destination "$SITE_DIR/public" --cleanDestinationDir; then
|
||||
echo "✓ Live-Seite gebaut."
|
||||
else
|
||||
echo "WARN: Hugo-Build fehlgeschlagen — Live-Seite bleibt leer bis zum ersten Publish."
|
||||
fi
|
||||
|
||||
exec node src/index.js
|
||||
Reference in New Issue
Block a user