42 lines
1.1 KiB
Markdown
42 lines
1.1 KiB
Markdown
# Qlockify Deployment
|
|
|
|
This repository is the deployment layer only.
|
|
|
|
It does not contain application source copies. Docker builds read directly from the sibling repositories:
|
|
|
|
- `../qlockify-backend`
|
|
- `../qlockify-frontend`
|
|
|
|
## Local structure
|
|
|
|
The expected directory layout is:
|
|
|
|
```text
|
|
Qlockify/
|
|
qlockify-backend/
|
|
qlockify-frontend/
|
|
qlockify-deployment/
|
|
```
|
|
|
|
## Deployment flow
|
|
|
|
1. Configure deployment env files:
|
|
- `./.env`
|
|
- `./backend/.env`
|
|
- `./frontend/.env`
|
|
2. From `qlockify-deployment`, build and start the stack:
|
|
|
|
```powershell
|
|
docker compose up --build
|
|
```
|
|
|
|
The backend container runs database migrations and `collectstatic` on startup, then serves Django with Gunicorn using `config.wsgi:application`.
|
|
|
|
## SSE Notifications
|
|
|
|
Notifications now use Server-Sent Events at `/api/notifications/stream/`.
|
|
|
|
- Nginx disables buffering and cacheing for the SSE endpoint.
|
|
- The current Gunicorn setup can serve SSE for MVP traffic, but each live stream consumes a worker while connected.
|
|
- If notification concurrency grows, move the SSE endpoint to an async worker class or a dedicated ASGI process.
|