random-access/docker-compose.dev.yml

20 lines
666 B
YAML

# Development overrides for docker-compose
# Use with: docker-compose -f docker-compose.yml -f docker-compose.dev.yml up
services:
# Override the api service to use the development configuration
api:
build:
context: .
dockerfile: Dockerfile.dev
env_file: .env
ports:
- "8000:80"
volumes:
# Mount source code for hot reload
- ./src:/app/src:ro
- ./pyproject.toml:/app/pyproject.toml:ro
# Mount templates if they change during development
- ./templates:/app/templates:ro
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/')"]