4aca82fb1a
CORS_ORIGINS was hardcoded in docker-compose.yml, silently overriding .env and breaking login for users who change the frontend port. It now comes from .env exclusively, with a clear comment in .env.example. Login page now distinguishes network errors (CORS/offline) from wrong credentials, and footer correctly references .env instead of config.yml.
60 lines
1.1 KiB
YAML
60 lines
1.1 KiB
YAML
services:
|
|
backend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.backend
|
|
restart: unless-stopped
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
# Override env_file: SQLite path must point inside the container volume
|
|
SQLITE_PATH: /app/data/homelab.db
|
|
volumes:
|
|
- backend_data:/app/data
|
|
networks:
|
|
- homelable
|
|
# Required for ping-based status checks
|
|
cap_add:
|
|
- NET_RAW
|
|
healthcheck:
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]
|
|
interval: 10s
|
|
timeout: 5s
|
|
retries: 6
|
|
start_period: 15s
|
|
|
|
mcp:
|
|
build:
|
|
context: ./mcp
|
|
dockerfile: Dockerfile.mcp
|
|
restart: unless-stopped
|
|
ports:
|
|
- "8001:8001"
|
|
env_file:
|
|
- .env
|
|
environment:
|
|
BACKEND_URL: "http://backend:8000"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- homelable
|
|
|
|
frontend:
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.frontend
|
|
restart: unless-stopped
|
|
ports:
|
|
- "3000:80"
|
|
depends_on:
|
|
- backend
|
|
networks:
|
|
- homelable
|
|
|
|
volumes:
|
|
backend_data:
|
|
|
|
networks:
|
|
homelable:
|
|
driver: bridge
|