diff --git a/README.md b/README.md index bf586ed..60d7c7c 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ open http://localhost:8000 ### Using Docker Compose ```yaml -version: '3.8' +version: "3.8" services: baby-monitor: @@ -83,28 +83,31 @@ uv run uvicorn src.baby_monitor.main:app --reload --host 0.0.0.0 --port 8000 ### Environment Variables -| Variable | Default | Description | -|----------|---------|-------------| -| `ENVIRONMENT` | `production` | Set to `development` to enable API docs | -| `ADMIN_PASSWORD` | *(required)* | Admin user password | -| `ADMIN_USERNAME` | `admin` | Admin username | -| `DATA_DIR` | `/data` | Directory for SQLite database | -| `REDIS_URI` | *(optional)* | Redis connection URI for distributed tokens | +| Variable | Default | Description | +| ---------------- | ------------ | ------------------------------------------- | +| `ENVIRONMENT` | `production` | Set to `development` to enable API docs | +| `ADMIN_PASSWORD` | _(required)_ | Admin user password | +| `ADMIN_USERNAME` | `admin` | Admin username | +| `DATA_DIR` | `/data` | Directory for SQLite database | +| `REDIS_URI` | _(optional)_ | Redis connection URI for distributed tokens | ### Storage Options **SQLite (Default)** + - Automatic setup, no configuration needed - Data stored in `/data/baby_monitor.db` - Perfect for single-server deployments **Redis (Optional)** + ```bash # Enable Redis token storage export REDIS_URI=redis://localhost:6379 ``` **PostgreSQL (Future)** + - Repository interface ready - Swap implementation in `dependencies.py` @@ -190,6 +193,7 @@ uv run pytest tests/integration/ ### Docker Swarm / Kubernetes The application is stateless when using Redis for tokens, making it suitable for: + - Multi-replica deployments - Load balancing - Rolling updates @@ -197,6 +201,7 @@ The application is stateless when using Redis for tokens, making it suitable for ### CI/CD Gitea Actions workflow included: + - Builds multi-architecture images (amd64, arm64) - Automatic semantic versioning - Pushes to container registry @@ -212,15 +217,15 @@ When running in development mode (`ENVIRONMENT=development`): ### Key Endpoints -| Endpoint | Method | Description | -|----------|--------|-------------| -| `/` | GET | Serve home page | -| `/api/` | GET | Authenticated API root | -| `/api/login` | POST | User authentication | -| `/api/logout` | POST | Invalidate token | -| `/health` | GET | Health check | -| `/ready` | GET | Readiness probe | -| `/info` | GET | Feature detection | +| Endpoint | Method | Description | +| ------------- | ------ | ---------------------- | +| `/` | GET | Serve home page | +| `/api/` | GET | Authenticated API root | +| `/api/login` | POST | User authentication | +| `/api/logout` | POST | Invalidate token | +| `/health` | GET | Health check | +| `/ready` | GET | Readiness probe | +| `/info` | GET | Feature detection | ## 🤝 Contributing