Skip to content

Sample apps

The samples/ directory in the main repo (also pushed as the standalone mezzanine-samples repo) holds 9 reference apps — one per workflow template — so you can verify the panel end-to-end without hunting for real codebases to deploy.

What’s in each sample

Every sample is intentionally tiny (~20 lines of real code) and exposes the same two things:

  • A home page with a VERSION = 'v1' constant near the top
  • A /health endpoint the deploy workflow probes after restart

Bump VERSION, push, and confirm the new string lands. If it doesn’t, your deploy didn’t actually replace the file — the workflow log is the place to look.

The 9 samples

Sample dirWorkflow templateDeploy pathHealthcheck
static/static/var/www/sitehttp://localhost/
php/php/var/www/apphttp://localhost/
wordpress/wordpress/var/www/wp (drop-in theme)http://localhost/
react/react/var/www/reacthttp://localhost/
nextjs/nextjs/opt/nextapphttp://127.0.0.1:3000/
nodejs/nodejs/opt/nodeapphttp://127.0.0.1:3000/health
django/django/opt/django-apphttp://127.0.0.1:8000/
flask/flask/opt/flask-apphttp://127.0.0.1:8000/health
fastapi/fastapi/opt/fastapi-apphttp://127.0.0.1:8000/health

How to use one

  1. Push the sample to its own git repo. Each subdirectory is meant to be the root of its own repository:

    Terminal window
    cd samples/nodejs
    git init && git add -A && git commit -m "init"
    gh repo create mezzanine-sample-nodejs --public --source . --push
  2. Adopt the target server in Mezzanine (any Hostinger / Contabo / DigitalOcean / bare-metal box you already have).

  3. Create a deploy workflow from the matching template, point it at your new repo.

  4. Run it. Healthcheck step turns green → home page renders the version string.

  5. Test CI/CD by editing VERSION = 'v2', pushing, and watching the redeploy fire.

  6. Test Pools + LB with any of the API samples — adopt two servers, deploy the same sample to each, add both as Pool members, set an edge server, requests round-robin between them.

Suggested test order

For fastest dopamine:

  1. static — smallest blast radius, proves git pull + nginx
  2. nodejs — proves the pm2 + healthcheck path
  3. nextjs with a private repo — exercises the Deploy Key panel + the build step
  4. Two nodejs deployments + a Pool + LB → exercises horizontal scaling end-to-end