larpaso-website/docker-entrypoint-admin-seed.sh
Pascal Scholz 93178a24e3 Add login-protected admin editor for content and design
Adds a self-service editor at admin.larpaso.de so texts, images, links,
Impressum/Datenschutz, fonts, font sizes and colors can be changed without
a developer. All homepage/legal content moves into content/site.json and
a new content/theme.json drives every CSS color/font/size token; the
Astro pages read from these at build time.

The admin/ service (Node/Express) provides bcrypt+session login with
rate limiting, a schema-driven form UI (including a hex/RGB/alpha color
picker), image upload, and a publish action that runs the Astro build
and republishes into a volume shared with the nginx website container -
so edits go live without redeploying that container.

See DEPLOYMENT_ADMIN.md for the server-side setup steps.
2026-09-21 21:35:09 +02:00

18 lines
521 B
Bash

#!/bin/sh
set -e
# content/ lives on a persistent volume; seed each file from the image's
# untouched default on first run so a fresh volume isn't missing them.
mkdir -p /app/content
if [ ! -f /app/content/site.json ]; then
echo "Seeding content/site.json from image default..."
cp /app/content.default/site.json /app/content/site.json
fi
if [ ! -f /app/content/theme.json ]; then
echo "Seeding content/theme.json from image default..."
cp /app/content.default/theme.json /app/content/theme.json
fi
exec "$@"