Example App Walkthrough
Example App Walkthrough
Overview
example-app/ is a runnable multi-service project that exercises the full MiniPaaS workflow: local development, secrets, remote deployment over SSH, configuration, service orchestration, and background job execution.
It includes a web server, a queue worker, a stream consumer, and a cron service, all backed by PostgreSQL with PgQue.
Prerequisites
- Docker and a running Swarm (
docker swarm initfor a local run) - The MiniPaaS CLI: see CLI Installation
hurlfor the HTTP checks inapi.http
Run the Demo
From example-app/:
./demo-script.shThe script initializes the dev environment with the sample namespace, routes the example service locally, shapes the worker, job, and cron services, creates the Postgres secret, builds and rolls out the stack, applies Caddy routing, and runs the Hurl tests.
For a remote environment, run the individual commands against an environment that targets a manager over SSH. See CLI Usage.
What the Example Covers
example-workerconsumesexample_queueexample-consumerconsumesexample_streamexample-cronrunscleanup.pyon a scheduleexample-migrationruns the PgQue and application migrations once- HTTP endpoints:
POST /queue,GET /queue,POST /stream,GET /stream,GET /consumers
Next Steps
- Workers, Jobs, and Cron: shape service deploy blocks.
- Secrets Rotation: replace values safely.
- Caddy and TLS: expose services on a domain.