Files
manage/docker-compose.dev.yml
T
Developer b200025daa refactor(observability): drop file-SD writer for http_sd_configs
Slice 4 of observability-service-registry. Removes the shared-file
Prometheus bridge; external Prometheus now consumes node-exporter targets
via http_sd_configs against GET /api/monitoring/prometheus-targets.

- services/targets.py: removed write_prometheus_targets() (the file
  writer) and its json/Path/get_settings imports; updated module docstring.
  build_node_exporter_targets() is unchanged and still powers the HTTP
  endpoint.
- main.py: removed the startup write_prometheus_targets call.
- routers/settings.py: removed the _write_prometheus_targets helper and
  its three post machine create/update/delete call sites + the now-unused
  targets import.
- config.py: removed the prometheus_file_sd_dir field.
- docker-compose.yml / docker-compose.dev.yml: removed the
  PROMETHEUS_FILE_SD_DIR backend env var.
- tests: removed TestWritePrometheusTargets + the write_prometheus_targets
  import in test_targets.py; rewrote the two TestSettingsMachines tests to
  assert machines appear/disappear from /api/monitoring/prometheus-targets
  (the surviving HTTP path) instead of the removed file-writer side effect.

ruff clean; 239 backend tests pass.
2026-06-24 08:37:20 +00:00

66 lines
2.0 KiB
YAML

# Manage development stack — backend + frontend only.
#
# Manage does NOT deploy its own Grafana/Prometheus/Loki/Alertmanager stack.
# It exposes a /metrics endpoint and optional Alertmanager proxy endpoints so
# an *existing* observability deployment can scrape/consume them.
#
# For a ready-to-use example observability stack, see
# docker-compose.observability.yml and docs/observability-runbooks.md.
services:
backend:
build:
context: .
dockerfile: backend/Dockerfile
container_name: backend
command: uvicorn media_library_viewer_api.main:app --host 0.0.0.0 --port 8000 --reload
environment:
AUTH_ENABLED: "false"
OIDC_ISSUER_URL: ${OIDC_ISSUER_URL:-}
OIDC_AUDIENCE: ${OIDC_AUDIENCE:-}
OIDC_JWKS_URL: ${OIDC_JWKS_URL:-}
LOG_LEVEL: ${LOG_LEVEL:-INFO}
LOG_FORMAT: ${LOG_FORMAT:-text}
PROMETHEUS_ENABLED: "true"
SSH_KNOWN_HOSTS_PATH: /app/backend/.cache/known_hosts
ALERTMANAGER_URL: ${ALERTMANAGER_URL:-}
ALERTMANAGER_WEBHOOK_URL: ${ALERTMANAGER_WEBHOOK_URL:-}
MANAGE_ENCRYPTION_KEY: ${MANAGE_ENCRYPTION_KEY:?set MANAGE_ENCRYPTION_KEY in your .env}
ports:
- "8000:8000"
volumes:
- ./backend:/app/backend
- ${BACKEND_CACHE_DIR:-./backend-cache}:/app/backend/.cache
networks:
- web
restart: unless-stopped
frontend:
build:
context: .
dockerfile: frontend/Dockerfile
target: dev
container_name: frontend
environment:
VITE_API_URL: "/api"
VITE_OIDC_ENABLED: "false"
VITE_DEV_API_PROXY_TARGET: "http://backend:8000"
VITE_GRAFANA_URL: ${VITE_GRAFANA_URL:-http://localhost:3000}
VITE_PROMETHEUS_URL: ${VITE_PROMETHEUS_URL:-http://localhost:9090}
ports:
- "5173:5173"
volumes:
- ./frontend:/app/frontend
- frontend_node_modules:/app/frontend/node_modules
depends_on:
- backend
networks:
- web
restart: unless-stopped
networks:
web:
volumes:
frontend_node_modules: