feat(docker): rename web service to app, add nginx as web
All checks were successful
CVE Scan & Docker Build / security-scan (push) Successful in 53s
CVE Scan & Docker Build / build-and-push (push) Successful in 3m0s

Reorganize Docker Compose services: the Django/gunicorn container is now
`app` and nginx is `web`, better reflecting their roles. Add a dedicated
gunicorn configuration and install curl in the runtime image for health
checks.

Update documentation to reflect:
- Neo4j migration from ariel.incus to a dedicated umbriel.incus instance
- Rationale for requiring a dedicated Neo4j instance (single-tenancy
  assumptions, label/index isolation, schema ownership)
- New service naming in compose commands and log tailing examples
This commit is contained in:
2026-05-03 19:35:27 -04:00
parent a2c885cf34
commit 7185d326eb
10 changed files with 163 additions and 38 deletions

View File

@@ -18,7 +18,9 @@ DB_HOST=portia.incus
DB_PORT=5432
# --- Neo4j Graph Database ---
NEOMODEL_NEO4J_BOLT_URL=bolt://neo4j:password@ariel.incus:25554
# Dedicated Mnemosyne instance on Umbriel — do not share with Spelunker or any
# other graph workload. See README.md for the full rationale.
NEOMODEL_NEO4J_BOLT_URL=bolt://neo4j:password@umbriel.incus:7687
# --- Memcached ---
KVDB_LOCATION=127.0.0.1:11211

View File

@@ -8,6 +8,9 @@ from django.urls import include, path
from . import views
urlpatterns = [
# Health checks — no auth, must return 200 (not redirect) — use trailing slash
path("live/", views.live, name="live"),
path("ready/", views.ready, name="ready"),
# Landing / Dashboard
path("", views.landing, name="landing"),
path("dashboard/", views.dashboard, name="dashboard"),

View File

@@ -3,6 +3,9 @@ Mnemosyne project-level views — landing page and dashboard.
"""
from django.contrib.auth.decorators import login_required
from django.core.cache import cache
from django.db import connection
from django.http import JsonResponse
from django.shortcuts import render
from llm_manager.models import LLMApi, LLMModel
@@ -43,3 +46,22 @@ def dashboard(request):
context["library_count"] = None
return render(request, "mnemosyne/dashboard.html", context)
def live(request):
return JsonResponse({"status": "ok"})
def ready(request):
errors = {}
try:
connection.ensure_connection()
except Exception as e:
errors["db"] = str(e)
try:
cache.get("__readiness_probe__")
except Exception as e:
errors["cache"] = str(e)
if errors:
return JsonResponse({"status": "error", "errors": errors}, status=503)
return JsonResponse({"status": "ok"})