Skip to main content

Local dev stack

The Shellui monorepo layout runs every service from one Compose file in shellui/shellui at dev/docker-compose.yml. Then:

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 repository's Dockerfile exposes a dev build target for that stack. Compose builds ../../storage-service with target: dev, bind-mounts this checkout at /app, and publishes the API on host port 8002 (http://localhost:8002).

Production images are unchanged: the default (final) Dockerfile stage is still the Gunicorn image used by publish workflows.

Start storage-service in the stack​

  1. Clone storage-service next to shellui/shellui (see the shared contract in the Shellui handbook).
  2. Ensure dev/.env.local defines the storage variables below (Compose maps prefixed names like STORAGE_SECRET_KEY to SECRET_KEY inside the container).
  3. From shellui/dev, run ./start.sh.

Health check: http://localhost:8002/storage/v1/health.

The dev container runs migrate then python manage.py runserver 0.0.0.0:8000 with autoreload. Python dependencies live in /opt/venv so the bind mount does not hide them.

Environment variables​

Set these in dev/.env.local (prefixed names avoid clashes across services). Compose copies them into the storage container under the unprefixed names listed here.

VariableExample for the stackPurpose
SECRET_KEYSTORAGE_SECRET_KEY in .env.localDjango signing key. Any non-empty value is fine when DEBUG=true
DEBUGtrueLocal mode: optional issuer/audience, HTTP cookies, in-memory cache if Redis is missing
ALLOWED_HOSTSlocalhost,127.0.0.1,storageHost header allowlist
CSRF_TRUSTED_ORIGINShttp://localhost:8002,http://127.0.0.1:8002Django admin form posts from the browser
POSTGRES_DATABASE_URLpostgres://shellui:shellui@postgres:5432/storageShared Postgres, database name storage (Compose supplies the exact DSN)
POSTGRES_SSL_REQUIREfalseTLS off inside the dev network
REDIS_URLredis://redis:6379/1Shared Redis; DB index 1 for storage-service
IDENTITY_ISSUERhttp://localhost:8001Public JWT iss (browser-facing identity port)
IDENTITY_AUDIENCEshelluiJWT aud; must match identity-service JWT_AUDIENCE
IDENTITY_JWKS_URLhttp://identity:8000/.well-known/jwks.jsonServer-side JWKS fetch (Docker DNS, port 8000 inside the network)
IDENTITY_SERVICE_URLhttp://identity:8000Server-side calls to identity MCP internal APIs (revocations and approvals)
EMAIL_SERVICE_URLhttp://email:8000Forward storage events when EMAIL_SERVICE_API_KEY is set
EMAIL_SERVICE_ALLOW_PRIVATEtrueAllow the internal email-service origin
STORAGE_BACKENDfilesystemLocal blobs under /app/data/media (use a volume or bind mount for persistence)

Optional but useful:

VariableExamplePurpose
JWT_HS256_FALLBACK_SECRETsame as identity SECRET_KEYAccept HS256 debug tokens from identity when JWKS is empty
CORS_ALLOWED_ORIGINShttp://localhost:5174,http://localhost:5175Extra browser origins (Files and dashboard dev servers)
SCHEDULER_ENABLEDtrueCelery worker and beat in the dev container when REDIS_URL is set

Do not commit secrets. Example values only in .env.local.

Public vs internal URLs​

UseURL
Browser, OAuth metadata, JWT isshttp://localhost:8001 (identity), http://localhost:8002 (storage API)
JWKS fetch, MCP internal APIs, service webhookshttp://identity:8000, http://storage:8000, http://email:8000

Keep IDENTITY_ISSUER on the public identity origin. Point IDENTITY_JWKS_URL and IDENTITY_SERVICE_URL at the internal identity host so the container never calls localhost for identity.

Standalone vs stack​

This repository's own docker-compose.yml still maps port 8001 and targets the production image for a single-service smoke test. The Shellui dev stack uses port 8002 and the dev target instead.

Full variable reference: Configuration.