services: db: image: postgres:17 healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 5s timeout: 5s retries: 5 environment: POSTGRES_PASSWORD: postgres volumes: - ./docker-postgres-data:/var/lib/postgresql/data ports: - "5432:5432" web: command: > bash -c "uv run --active python manage.py migrate && \ uv run --active python manage.py collectstatic --noinput && \ uv run --active python manage.py runserver 0.0.0.0:8000" build: . image: mataroa volumes: - .:/code ports: - "8000:8000" depends_on: db: condition: service_healthy environment: DEBUG: 1 LOCALDEV: 1 DATABASE_URL: postgres://postgres:postgres@db:5432/postgres