Skip to main content

Shellui local dev stack

The full multi-service stack lives in shellui/shellui at dev/docker-compose.yml. Clone this repo next to the other Shellui services and start everything from shellui:

cd shellui/dev
./start.sh

Clone layout, URLs, common commands and troubleshooting are in the Shellui dev stack guide. This page only covers what is specific to this service.

This service image must be built with Docker target dev (deps in /opt/venv, source bind-mounted at /app). Browser URL: http://localhost:8006. Compose service name (internal DNS): ai.

Environment variables​

Set these on the ai container (shellui dev/.env.local.example may prefix names with AI_ to avoid clashes; compose maps them to the names below).

VariableLocal stack valueNotes
SECRET_KEYgeneratedDjango sessions and CSRF. At least 50 characters in production.
DEBUGtrueEnables runserver autoreload and relaxed signing checks.
ALLOWED_HOSTSlocalhost,127.0.0.1,aiInclude compose service name for internal health checks.
CSRF_TRUSTED_ORIGINShttp://localhost:8006,http://127.0.0.1:8006Add admin, dashboard, and files origins if you use Django admin locally.
POSTGRES_DATABASE_URLpostgres://<user>:<pass>@postgres:5432/aiShared Postgres; database name ai. Empty uses SQLite under /app/data.
REDIS_URLredis://redis:6379/5Shared Redis; DB index 5 for ai-service.
IDENTITY_ISSUERhttp://localhost:8001Public JWT iss (identity host port).
IDENTITY_AUDIENCEshelluiMust match identity-service JWT_AUDIENCE.
IDENTITY_JWKS_URLhttp://identity:8000/.well-known/jwks.jsonInternal JWKS fetch (server-to-server).
IDENTITY_SERVICE_URLhttp://identity:8000Internal origin for identity MCP (/mcp).
AI_SERVICE_ISSUERhttp://localhost:8006Public iss on RS256 delegation JWTs to identity.
AI_PUBLIC_URLhttp://localhost:8006Public origin; the MCP URL is {url}/c/<company_id>/mcp. Defaults to AI_SERVICE_ISSUER.
AI_SERVICE_SIGNING_KEYPEM or emptyRS256 private key; prefer AI_SERVICE_SIGNING_KEY_FILE on a mounted volume.
AI_SERVICE_SIGNING_KEY_FILE/app/data/signing.pemRun python manage.py generate_signing_key once and persist under /app/data.
AI_SERVICE_SIGNING_KIDfrom generate_signing_keyRequired when DEBUG=false; recommended in the stack.
STORAGE_SERVICE_URLhttp://storage:8000Downstream MCP origin.
HOSTING_SERVICE_URLhttp://hosting:8000Downstream MCP origin.
EMAIL_SERVICE_URLhttp://email:8000Downstream MCP origin.
EMAIL_SERVICE_ALLOW_PRIVATEtrueAllows internal http:// email origin in the stack.
EMAIL_SERVICE_API_KEYesk_… or emptyEmpty omits email from the aggregated MCP catalog.
SAAS_SERVICE_URLhttp://saas:8000Downstream MCP origin.
STORAGE_SERVICE_PUBLIC_URLhttp://localhost:8002Public resource for downstream tokens ({url}/mcp).
HOSTING_SERVICE_PUBLIC_URLhttp://localhost:8003Same, for hosting.
EMAIL_SERVICE_PUBLIC_URLhttp://localhost:8004Same, for email.
SAAS_SERVICE_PUBLIC_URLhttp://localhost:8005Same, for saas.
SECURE_SSL_REDIRECTfalseLocal HTTP.
SESSION_COOKIE_SECUREfalseLocal HTTP.
CSRF_COOKIE_SECUREfalseLocal HTTP.

Optional tuning (defaults in Configuration): MCP_GATEWAY_*, JWKS_*, CORS_*, LOG_LEVEL, JWT_HS256_FALLBACK_SECRET (dev only).

This repo only​

To run ai-service with its root docker-compose.yml (Redis plus bind-mounted source):

cp .env.example .env
# set SECRET_KEY; run: python manage.py generate_signing_key >> .env (or mount AI_SERVICE_SIGNING_KEY_FILE)
docker compose up --build

Health: GET http://localhost:8006/ai/v1/health

MCP: POST http://localhost:8006/c/<company_id>/mcp. Headless clients connect with OAuth device login against Identity (http://localhost:8001) and this gateway (http://localhost:8006). See Device login. Do not paste an access token into the agent chat.

Sibling services on the host use host.docker.internal defaults in docker-compose.yml; inside the shellui stack use the internal URLs in the table above.