Initial scaffold: FastAPI micro-services API (forge + founder)

This commit is contained in:
2026-06-05 02:48:04 +02:00
parent 350143ceb4
commit b2973b63ee
5 changed files with 79 additions and 220 deletions
+7 -20
View File
@@ -1,24 +1,11 @@
services:
api:
build:
context: .
dockerfile: Dockerfile
build: .
container_name: micro-api
ports:
- "${API_PORT:-8000}:8000"
environment:
- DEBUG=${DEBUG:-false}
- DATABASE_URL=${DATABASE_URL:-sqlite:///data/app.db}
volumes:
- api_data:/app/data
restart: unless-stopped
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/api/health')"]
interval: 30s
timeout: 5s
retries: 3
start_period: 10s
volumes:
api_data:
driver: local
ports:
- "8000:8000"
environment:
- ENV=production
volumes:
- ./data:/app/data