2026-03-07 00:45:50 +01:00
|
|
|
services:
|
|
|
|
|
backend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.backend
|
|
|
|
|
restart: unless-stopped
|
2026-03-09 11:45:35 +01:00
|
|
|
env_file:
|
|
|
|
|
- .env
|
2026-03-07 00:45:50 +01:00
|
|
|
environment:
|
2026-03-28 18:27:54 +01:00
|
|
|
# Override env_file: SQLite path must point inside the container volume
|
2026-03-07 00:45:50 +01:00
|
|
|
SQLITE_PATH: /app/data/homelab.db
|
|
|
|
|
volumes:
|
|
|
|
|
- backend_data:/app/data
|
|
|
|
|
networks:
|
|
|
|
|
- homelable
|
|
|
|
|
# Required for ping-based status checks
|
|
|
|
|
cap_add:
|
|
|
|
|
- NET_RAW
|
2026-09-02 15:54:51 +02:00
|
|
|
# MAC addresses: on this bridge network the scanner can never see them —
|
|
|
|
|
# ARP is layer 2 and every LAN host is one hop away behind the Docker
|
|
|
|
|
# gateway. To collect MACs (and so keep DHCP devices matched across an IP
|
|
|
|
|
# change), put the backend on the LAN: comment out the `networks:` key
|
|
|
|
|
# above and uncomment the line below (Linux hosts only).
|
|
|
|
|
# network_mode: host
|
2026-03-28 12:33:35 +01:00
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "curl", "-f", "http://localhost:8000/api/v1/health"]
|
|
|
|
|
interval: 10s
|
|
|
|
|
timeout: 5s
|
|
|
|
|
retries: 6
|
|
|
|
|
start_period: 15s
|
2026-03-07 00:45:50 +01:00
|
|
|
|
2026-03-13 16:41:34 +01:00
|
|
|
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
|
|
|
|
|
|
2026-03-07 00:45:50 +01:00
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile.frontend
|
2026-09-04 10:58:40 +02:00
|
|
|
args:
|
|
|
|
|
# Serve Homelable under a subpath, e.g. VITE_BASE_PATH=/homelab/ in .env.
|
|
|
|
|
# Defaults to the root — see docs/INSTALLATION.md.
|
|
|
|
|
VITE_BASE_PATH: ${VITE_BASE_PATH:-/}
|
2026-03-07 00:45:50 +01:00
|
|
|
restart: unless-stopped
|
|
|
|
|
ports:
|
|
|
|
|
- "3000:80"
|
|
|
|
|
depends_on:
|
|
|
|
|
- backend
|
|
|
|
|
networks:
|
|
|
|
|
- homelable
|
|
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
backend_data:
|
|
|
|
|
|
|
|
|
|
networks:
|
|
|
|
|
homelable:
|
|
|
|
|
driver: bridge
|