Files
crr-shifts/docker-compose.dev.yml
T
2026-10-06 00:59:48 +01:00

36 lines
997 B
YAML

# Development stack: code is bind-mounted, reload is on, no restart policy.
# Run standalone: docker compose -f docker-compose.dev.yml up --build
# Tests: docker compose -f docker-compose.dev.yml run --rm tests
services:
app:
build:
context: .
target: dev
container_name: bar-rota-dev
env_file:
- path: .env
required: false
ports:
- "8000:8000"
volumes:
- ./app:/app/app
- ./tests:/app/tests
- ${DATA_DIR:-./data}:/app/data
command: ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "8000", "--reload"]
tests:
build:
context: .
target: dev
profiles:
- test
environment:
SECRET_KEY: test-only-secret-key
DATABASE_URL: sqlite:///./data/test.db
INITIAL_ADMIN_PASSWORD: test-only-password
PYTHONPATH: /app
volumes:
- ./app:/app/app
- ./tests:/app/tests
- ./pyproject.toml:/app/pyproject.toml:ro
command: ["pytest", "-ra"]