46 lines
840 B
Markdown
46 lines
840 B
Markdown
# WaterTrek Backend
|
|
|
|
Skeleton Django backend for WaterTrek, using `uv` for package management and Docker for local development.
|
|
|
|
## Stack
|
|
|
|
- Django project: `WaterTrek`
|
|
- First app: `booking`
|
|
- Package manager: `uv`
|
|
- Database: PostgreSQL (Docker service)
|
|
|
|
## Run with Docker
|
|
|
|
1. Optional: copy env defaults
|
|
|
|
```bash
|
|
cp .env.example .env
|
|
```
|
|
|
|
2. Build and start:
|
|
|
|
```bash
|
|
docker compose up --build
|
|
```
|
|
|
|
3. Visit the health endpoint:
|
|
|
|
- `http://localhost:8003/booking/health/`
|
|
|
|
## Run locally with uv
|
|
|
|
If your machine has internet access available for dependency install:
|
|
|
|
```bash
|
|
uv sync
|
|
uv run python manage.py migrate
|
|
uv run python manage.py runserver
|
|
```
|
|
|
|
## Production-style server in Docker
|
|
|
|
The `web` container runs Gunicorn:
|
|
|
|
```bash
|
|
uv run gunicorn WaterTrek.wsgi:application --bind 0.0.0.0:8003 --workers 3
|
|
``` |