36 lines
1.3 KiB
Markdown
36 lines
1.3 KiB
Markdown
# w4c-workflows-api
|
|
|
|
Control plane and worker for the custom workflows engine. One Docker image, two entrypoints:
|
|
|
|
- **default** — HTTP control plane (API, trigger scheduler, Mermaid, API-key management)
|
|
- **--worker** — per-tenant execution worker (pull/exec/result over Redis)
|
|
|
|
## Structure
|
|
|
|
```
|
|
├── Controllers/ API controllers (health, keys, runs, workflows, webhooks)
|
|
├── Data/ EF Core DbContext + migrations (PostgreSQL)
|
|
├── Filters/ Action filters (e.g. RequireScope)
|
|
├── Middleware/ Auth middleware
|
|
├── Models/ EF entities + YAML schema models
|
|
├── Services/ Business logic:
|
|
│ ├── Execution/ Script executors (shell, python, node, ts, c#, agent)
|
|
│ ├── Messaging/ Redis Streams transport
|
|
│ ├── Runs/ Run lifecycle engine, task dispatcher
|
|
│ └── Triggers/ Cron/schedule trigger scheduler
|
|
├── workflows/ YAML workflow definitions (synced from source)
|
|
├── w4c-workflows-api.Tests/ xunit tests (unit + integration with Testcontainers)
|
|
├── Dockerfile
|
|
└── Program.cs
|
|
```
|
|
|
|
## Building
|
|
|
|
```bash
|
|
docker build -t w4c-workflows-api -f Dockerfile .
|
|
```
|
|
|
|
## Running locally
|
|
|
|
Requires PostgreSQL and Redis. See `appsettings.json` for connection strings.
|