3 Commits
Author SHA1 Message Date
Brian Bjarke Jensen b8e04fe816 corrected gitea instance links
Build and Push Docker Image / build-and-push (push) Successful in 56s
Python Code Quality / python-code-quality (push) Successful in 9s
Python Test / python-test (push) Successful in 14s
2025-11-06 23:41:51 +01:00
Brian Bjarke Jensen c2d272d7ac prettier fixes 2025-11-06 23:37:55 +01:00
Brian Bjarke Jensen f15e87a484 added prettier 2025-11-06 23:37:35 +01:00
3 changed files with 36 additions and 19 deletions
+12 -7
View File
@@ -37,7 +37,7 @@ open http://localhost:8000
### Using Docker Compose ### Using Docker Compose
```yaml ```yaml
version: '3.8' version: "3.8"
services: services:
baby-monitor: baby-monitor:
@@ -84,27 +84,30 @@ uv run uvicorn src.baby_monitor.main:app --reload --host 0.0.0.0 --port 8000
### Environment Variables ### Environment Variables
| Variable | Default | Description | | Variable | Default | Description |
|----------|---------|-------------| | ---------------- | ------------ | ------------------------------------------- |
| `ENVIRONMENT` | `production` | Set to `development` to enable API docs | | `ENVIRONMENT` | `production` | Set to `development` to enable API docs |
| `ADMIN_PASSWORD` | *(required)* | Admin user password | | `ADMIN_PASSWORD` | _(required)_ | Admin user password |
| `ADMIN_USERNAME` | `admin` | Admin username | | `ADMIN_USERNAME` | `admin` | Admin username |
| `DATA_DIR` | `/data` | Directory for SQLite database | | `DATA_DIR` | `/data` | Directory for SQLite database |
| `REDIS_URI` | *(optional)* | Redis connection URI for distributed tokens | | `REDIS_URI` | _(optional)_ | Redis connection URI for distributed tokens |
### Storage Options ### Storage Options
**SQLite (Default)** **SQLite (Default)**
- Automatic setup, no configuration needed - Automatic setup, no configuration needed
- Data stored in `/data/baby_monitor.db` - Data stored in `/data/baby_monitor.db`
- Perfect for single-server deployments - Perfect for single-server deployments
**Redis (Optional)** **Redis (Optional)**
```bash ```bash
# Enable Redis token storage # Enable Redis token storage
export REDIS_URI=redis://localhost:6379 export REDIS_URI=redis://localhost:6379
``` ```
**PostgreSQL (Future)** **PostgreSQL (Future)**
- Repository interface ready - Repository interface ready
- Swap implementation in `dependencies.py` - Swap implementation in `dependencies.py`
@@ -190,6 +193,7 @@ uv run pytest tests/integration/
### Docker Swarm / Kubernetes ### Docker Swarm / Kubernetes
The application is stateless when using Redis for tokens, making it suitable for: The application is stateless when using Redis for tokens, making it suitable for:
- Multi-replica deployments - Multi-replica deployments
- Load balancing - Load balancing
- Rolling updates - Rolling updates
@@ -197,6 +201,7 @@ The application is stateless when using Redis for tokens, making it suitable for
### CI/CD ### CI/CD
Gitea Actions workflow included: Gitea Actions workflow included:
- Builds multi-architecture images (amd64, arm64) - Builds multi-architecture images (amd64, arm64)
- Automatic semantic versioning - Automatic semantic versioning
- Pushes to container registry - Pushes to container registry
@@ -213,7 +218,7 @@ When running in development mode (`ENVIRONMENT=development`):
### Key Endpoints ### Key Endpoints
| Endpoint | Method | Description | | Endpoint | Method | Description |
|----------|--------|-------------| | ------------- | ------ | ---------------------- |
| `/` | GET | Serve home page | | `/` | GET | Serve home page |
| `/api/` | GET | Authenticated API root | | `/api/` | GET | Authenticated API root |
| `/api/login` | POST | User authentication | | `/api/login` | POST | User authentication |
@@ -252,9 +257,9 @@ This project is licensed under the MIT License - see the LICENSE file for detail
## 📧 Contact ## 📧 Contact
Brian Bjarke Jensen - [@bbj](https://gitea.example.com/bbj) Brian Bjarke Jensen - [@brian](https://gitea.gt-proj.com/brian)
Project Link: [https://gitea.example.com/bbj/baby-monitor](https://gitea.example.com/bbj/baby-monitor) Project Link: [https://gitea.gt-proj.com/brian/baby-monitor](https://gitea.gt-proj.com/brian/baby-monitor)
--- ---
+1
View File
@@ -30,6 +30,7 @@ dev = [
"httpx>=0.28.1", "httpx>=0.28.1",
"mypy>=1.18.2", "mypy>=1.18.2",
"pre-commit>=4.3.0", "pre-commit>=4.3.0",
"prettier>=0.0.7",
"pytest>=8.4.2", "pytest>=8.4.2",
"pytest-cov>=7.0.0", "pytest-cov>=7.0.0",
"pyupgrade>=3.21.0", "pyupgrade>=3.21.0",
Generated
+11
View File
@@ -57,6 +57,7 @@ dev = [
{ name = "httpx" }, { name = "httpx" },
{ name = "mypy" }, { name = "mypy" },
{ name = "pre-commit" }, { name = "pre-commit" },
{ name = "prettier" },
{ name = "pytest" }, { name = "pytest" },
{ name = "pytest-cov" }, { name = "pytest-cov" },
{ name = "pyupgrade" }, { name = "pyupgrade" },
@@ -79,6 +80,7 @@ dev = [
{ name = "httpx", specifier = ">=0.28.1" }, { name = "httpx", specifier = ">=0.28.1" },
{ name = "mypy", specifier = ">=1.18.2" }, { name = "mypy", specifier = ">=1.18.2" },
{ name = "pre-commit", specifier = ">=4.3.0" }, { name = "pre-commit", specifier = ">=4.3.0" },
{ name = "prettier", specifier = ">=0.0.7" },
{ name = "pytest", specifier = ">=8.4.2" }, { name = "pytest", specifier = ">=8.4.2" },
{ name = "pytest-cov", specifier = ">=7.0.0" }, { name = "pytest-cov", specifier = ">=7.0.0" },
{ name = "pyupgrade", specifier = ">=3.21.0" }, { name = "pyupgrade", specifier = ">=3.21.0" },
@@ -437,6 +439,15 @@ wheels = [
{ url = "http://10.0.0.2:5001/index/pre-commit/pre_commit-4.3.0-py2.py3-none-any.whl", hash = "sha256:2b0747ad7e6e967169136edffee14c16e148a778a54e4f967921aa1ebf2308d8" }, { url = "http://10.0.0.2:5001/index/pre-commit/pre_commit-4.3.0-py2.py3-none-any.whl", hash = "sha256:2b0747ad7e6e967169136edffee14c16e148a778a54e4f967921aa1ebf2308d8" },
] ]
[[package]]
name = "prettier"
version = "0.0.7"
source = { registry = "http://10.0.0.2:5001/index/" }
sdist = { url = "http://10.0.0.2:5001/index/prettier/prettier-0.0.7.tar.gz", hash = "sha256:6c34b8cd09fd9c8956c05d6395ea3f575e0122dce494ba57685c07065abed427" }
wheels = [
{ url = "http://10.0.0.2:5001/index/prettier/prettier-0.0.7-py3-none-any.whl", hash = "sha256:20e76791de41cafe481328dd49552303f29ca192151cee1b120c26f66cae9bfc" },
]
[[package]] [[package]]
name = "psycopg2-binary" name = "psycopg2-binary"
version = "2.9.11" version = "2.9.11"