feat: Add Docker support and CI/CD workflows documentation; include setup instructions for Docker-based deployment
Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m35s
Deploy to Server / deploy (push) Failing after 3s
Run Tests / test (push) Failing after 6m2s

This commit is contained in:
2025-10-23 17:25:26 +02:00
parent 119bbcc7a8
commit f228eac61f
4 changed files with 101 additions and 14 deletions

View File

@@ -22,6 +22,23 @@ pip install -r requirements.txt
uvicorn main:app --reload
```
## Docker-based setup
To build and run the application using Docker instead of a local Python environment:
```powershell
# Build the application image (multi-stage build keeps runtime small)
docker build -t calminer:latest .
# Start the container on port 8000
docker run --rm -p 8000:8000 calminer:latest
# Supply environment variables (e.g., Postgres connection)
docker run --rm -p 8000:8000 -e DATABASE_URL="postgresql://user:pass@host/db" calminer:latest
```
If you maintain a Postgres or Redis dependency locally, consider authoring a `docker compose` stack that pairs them with the app container. The Docker image expects the database to be reachable and migrations executed before serving traffic.
## Usage Overview
- **API base URL**: `http://localhost:8000/api`