Skip to content

Latest commit

 

History

History

docker-example

README.md

StepFlow docker example

Runs the full stack as one Docker Compose demo: the visual builder UI (nginx), the standalone dynamic API host, and the StepFlow backend. Fresh clones start with an empty database — create flows / publish APIs from the UI or MCP to populate it (the smoke/ scripts show end-to-end examples).

Architecture

flowchart LR
    B[Browser] -->|"/ (SPA)"| FE["frontend :80<br/>nginx + built SPA"]
    FE -->|"/api/*"| BE["backend :5001<br/>StepFunctionsApp (.NET 10)"]
    FE -->|"/mcp (SSE)"| BE
    H[Host tools] -.->|":5002 direct"| DAH["dynamic-api :5002<br/>DynamicApiHost (.NET 10)"]
    DAH -->|"catalog poll every 30 s<br/>GET api/dynamic/apis?published=true"| BE
Loading

Quick start

From the repo root:

docker compose -f docker-example/docker-compose.yml up --build

Then open http://localhost:8080/.

URLs

URL What it is
http://localhost:8080/ Builder UI (nginx; /api and /mcp proxied to the backend)
http://localhost:5001/api/health Backend direct — returns "healthy"
http://localhost:5002/api/dynamic/orders Published Orders API via DynamicApiHost (EAV domain OrderApproval; GET lists rows, POST creates one)

The dynamic API requires the bearer token you configured when publishing it (set in the Dynamic API panel / publish call):

curl -H "Authorization: Bearer <your-orders-api-token>" http://localhost:5002/api/dynamic/orders/

Verification curls

# UI HTML contains "StepFlow"
curl -s http://localhost:8080/ | Select-String StepFlow

# Proxied health returns "healthy"
curl -s http://localhost:8080/api/health

# Dynamic API eav GET with bearer token (use the token you set when publishing)
curl -H "Authorization: Bearer <your-orders-api-token>" http://localhost:5002/api/dynamic/orders/

Notes

  • Port overrides: the backend binds localhost per the DynamicApi section of its appsettings.json; compose sets DynamicApi__ListenAddress="*" so sibling containers can reach it. DynamicApiHost likewise gets ASPNETCORE_URLS=http://+:5002 and Engine__BaseUrl=http://backend:5001.
  • Self-healing: if the backend starts after dynamic-api, the catalog poll (every 30 s) picks up published APIs without a restart.
  • Teardown: docker compose -f docker-example/docker-compose.yml down