Skip to content

[FEATURE] Knowledge Explorer Deployment Templates #681

Description

@KaifAhmad1

Problem

The Knowledge Explorer has no ready-to-use deployment setup. The existing Dockerfile fails on a clean checkout (wrong directory path), docker-compose.yml only starts FalkorDB with no Explorer service, and there are no configs for any cloud platform. Developers who want to host the Explorer for their team must figure out the full stack from scratch.

Requested

Add a deploy/ directory with templates for the following targets, plus fix the root Docker setup.


Pre-requisites (code changes needed first)

  • Add a /api/health endpoint returning {"status": "ok"} — all platforms below depend on it for healthchecks
  • Ensure FALKORDB_HOST, FALKORDB_PORT, and ALLOWED_ORIGINS are read from environment variables in semantica/explorer/app.py

1 · Docker (fix + full stack)

  • Fix Dockerfile — correct the explorer/ path, add a non-root user, add HEALTHCHECK
  • Add .dockerignore — exclude node_modules, .git, __pycache__, tests/, .env
  • Fix docker-compose.yml — add the Explorer service alongside FalkorDB with depends_on and a shared network
  • Add docker-compose.dev.yml — volume-mount source dirs for hot-reload

Target UX:

docker compose up        # full stack, one command

2 · Railway

  • deploy/railway/railway.toml — Dockerfile builder, healthcheck path, restart policy
  • Env vars wired from the Railway Redis plugin (FALKORDB_HOST, FALKORDB_PORT)

3 · Render

  • deploy/render/render.yaml — Blueprint that provisions both the web service and a Redis instance together
  • Healthcheck path, starter plan, env vars cross-linked between services

4 · Fly.io

  • deploy/fly/fly.toml — region, VM size (512 MB), auto-stop, HTTP healthcheck
  • Short README with the four flyctl commands to deploy from zero

5 · GCP Cloud Run

  • deploy/gcp/cloudbuild.yaml — build, push to GCR, deploy to Cloud Run in one pipeline
  • deploy/gcp/cloudrun-service.yaml — declarative service spec with scale-to-zero, env vars from Secret Manager, liveness probe

6 · Azure Container Apps

  • deploy/azure/azure.yaml — AZD project definition
  • deploy/azure/main.bicep — Container App + managed environment, HTTP ingress, scale rules (min 0 / max 10), liveness probe
  • deploy/azure/main.parameters.json — parameter template

Target UX:

azd up   # provisions infra + deploys container

7 · Kubernetes + Helm

Raw manifests (deploy/kubernetes/):

  • namespace.yaml, configmap.yaml, secret.yaml.example
  • deployment.yaml — 2 replicas, rolling update, liveness + readiness probes, resource limits
  • service.yaml — ClusterIP
  • ingress.yaml — nginx-ingress with cert-manager TLS annotation
  • kustomization.yaml — apply everything with kubectl apply -k

Helm chart (deploy/helm/knowledge-explorer/):

  • Chart.yaml, values.yaml, values.prod.yaml
  • Templates: deployment, service, ingress, configmap, HPA
  • HPA enabled via autoscaling.enabled: true in values

Acceptance Criteria

  • docker compose up starts a working Explorer at http://localhost:8000 with no extra steps
  • docker build . succeeds on a clean checkout
  • Each deploy/<platform>/ folder has a short README.md with the exact commands to deploy from zero
  • helm lint passes on the Helm chart
  • No secrets committed — secret.yaml files are .example templates only

Implementation Order

Priority Task
P0 Fix Dockerfile + .dockerignore + docker-compose.yml
P0 Add /api/health endpoint
P1 Railway + Render
P1 Fly.io
P2 GCP Cloud Run + Azure Container Apps
P3 Kubernetes manifests + Helm chart

Metadata

Metadata

Labels

enhancementNew feature or request
No fields configured for Feature.

Projects

Status
In progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions