kirche-einfach/frontend/entrypoint.sh
Jonas Miederer af993bd43f
Some checks failed
/ test (push) Has been cancelled
/ build (push) Has been cancelled
/ validate (push) Has been cancelled
feat: unify on single repo-root compose file for dev and prod
2026-09-07 19:46:17 +00:00

14 lines
392 B
Bash

#!/bin/sh
# Frontend entrypoint (dev + prod).
# FRONTEND_MODE=dev (compose default) runs the HMR dev server.
# FRONTEND_MODE=preview (prod .env) builds once and serves the bundle.
set -e
cd /srv/kirche-einfach/frontend
if [ "${FRONTEND_MODE:-dev}" = "dev" ]; then
exec npm run dev -- --host 0.0.0.0 --port 3000
else
npm run build
exec npm run preview -- --host 0.0.0.0 --port 3000
fi