feat(docker): rename web service to app, add nginx as web
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:
@@ -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
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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"})
|
||||
|
||||
Reference in New Issue
Block a user