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
15
backend/entrypoint.sh
Normal file
15
backend/entrypoint.sh
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#!/bin/sh
|
||||
# Backend entrypoint (dev + prod): migrate, then serve.
|
||||
# APP_ENV=dev (set via devcontainer.json containerEnv, attached container
|
||||
# only) enables autoreload. Anything else runs the plain production server.
|
||||
set -e
|
||||
|
||||
cd /srv/kirche-einfach/backend
|
||||
|
||||
.venv/bin/alembic upgrade head
|
||||
|
||||
if [ "${APP_ENV:-prod}" = "dev" ]; then
|
||||
exec .venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000 --reload
|
||||
else
|
||||
exec .venv/bin/uvicorn app.main:app --host 0.0.0.0 --port 8000
|
||||
fi
|
||||
Loading…
Add table
Add a link
Reference in a new issue