Add hosting deployment setup and backend health endpoint
Some checks failed
continuous-integration/drone/push Build was killed
Some checks failed
continuous-integration/drone/push Build was killed
This commit is contained in:
33
HOSTING_DEPLOY.md
Normal file
33
HOSTING_DEPLOY.md
Normal file
@@ -0,0 +1,33 @@
|
||||
# Hosting Deployment
|
||||
|
||||
## 1) Prerequisites
|
||||
- Docker Engine + Docker Compose plugin
|
||||
- Domain pointing to your host IP
|
||||
- (Optional) HTTPS reverse proxy in front of port 80
|
||||
|
||||
## 2) Prepare environment
|
||||
```bash
|
||||
cp backend/.env.example backend/.env
|
||||
cp deploy/.env.hosting.example deploy/.env
|
||||
```
|
||||
|
||||
Edit `backend/.env`:
|
||||
- `SECRET_KEY`
|
||||
- `BASE_URL` and `FRONTEND_URL` (your real domain)
|
||||
- `SSO_ENABLED=true` + `ZITADEL_*` only if you use SSO
|
||||
|
||||
## 3) Pull and run published images
|
||||
```bash
|
||||
docker compose --env-file deploy/.env -f deploy/docker-compose.hosting.yml pull
|
||||
docker compose --env-file deploy/.env -f deploy/docker-compose.hosting.yml up -d
|
||||
```
|
||||
|
||||
## 4) Verify
|
||||
- Frontend: `http://<your-host>/`
|
||||
- Backend health: `docker compose -f deploy/docker-compose.hosting.yml logs backend`
|
||||
- Frontend health: `docker compose -f deploy/docker-compose.hosting.yml logs frontend`
|
||||
|
||||
## Notes
|
||||
- Frontend uses same-origin `/api` in production, so no hardcoded API host is required.
|
||||
- Backend health endpoint is `/health`.
|
||||
- If you need local frontend->local backend development, use `frontend/.env.local`.
|
||||
Reference in New Issue
Block a user