feat: unify on single repo-root compose file for dev and prod
This commit is contained in:
parent
9acdbaa453
commit
af993bd43f
18 changed files with 253 additions and 229 deletions
14
frontend/entrypoint.sh
Normal file
14
frontend/entrypoint.sh
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#!/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
|
||||
Loading…
Add table
Add a link
Reference in a new issue