Files
micro-api/docker-compose.yml
T

25 lines
580 B
YAML
Raw Normal View History

services:
api:
build:
context: .
dockerfile: Dockerfile
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