Docker Compose example app for Node Hub - Compose type
Find a file
Mark Whaite 2e9c30b70e Format plan checklist so runner extracts commands
The Verify gate's legacy-fanout fallback (pytest/npm/cargo) was triggering
because the _extract_verify_commands regex requires the entire bullet payload
to be a single backtick-wrapped command. Lines like

    - [ ] `bash -n .githooks/pre-commit` — shell syntax check passes.

fail fullmatch (prose after the closing backtick), so extraction returns []
and the runner falls back to the tool-fanout — which fails on this
bare/config-only repo (no package.json, no Cargo.toml).

Reformat each checklist bullet so the payload IS the command, with no
trailing prose. Same four commands; extraction now yields 4 entries and
run_plan_verify passes.
2026-09-14 09:56:37 -07:00
.githooks Extend pre-commit hook with universal guards 2026-09-14 09:40:58 -07:00
.kilo/plans Format plan checklist so runner extracts commands 2026-09-14 09:56:37 -07:00
.gitignore Add .gitignore for GSD infrastructure, .venv, and .env 2026-09-14 09:37:18 -07:00
app.yml Initial commit 2026-03-15 09:24:56 -07:00
docker-compose.yml Initial commit 2026-03-15 09:24:56 -07:00
README.md Initial commit 2026-03-15 09:24:56 -07:00

Compose Example - Multi-Service App

This is a multi-service app demonstrating the Compose App packaging mode.

Files

  • app.yml - Launcher manifest with type: compose
  • docker-compose.yml - Multi-service compose file

Services

  • web (nginx:alpine) - Public-facing web server
  • db (postgres:16) - Internal database (not exposed to host)

How It Works

The launcher:

  1. Reads app.yml and sees type: compose
  2. Uses your docker-compose.yml as-is (with security transformations)
  3. Only proxies the service named in compose.proxyService (the "web" service)
  4. Other services (like "db") run internally but are NOT exposed to the host

Security

The launcher rejects compose files with:

  • build: instructions
  • env_file:
  • Bind mounts (./, ../, absolute paths)
  • privileged, network_mode: host, etc.
  • ${VAR} interpolation

See the main README for full security limits.

Testing Locally

# Start services
docker-compose up -d

# Check they're running
docker-compose ps

# Stop
docker-compose down

Deploying via Forgejo Actions

This app includes a workflow at .forgejo/workflows/deploy.yml that:

  1. Validates - Checks compose file syntax
  2. Tests - Starts services and runs tests
  3. Deploys - On push to main, deploys to the launcher

Setup

  1. Configure secrets in your Forgejo repository:

    • LAUNCHER_URL - Your launcher URL
    • LAUNCHER_TOKEN - API token from the launcher
  2. Push to main - The workflow validates, tests, then deploys

Using External Images

You can use images from any registry (Docker Hub, Forgejo registry, etc.):

# docker-compose.yml
services:
  web:
    image: "nginx:alpine"
  db:
    image: "postgres:16"

Or build and push to Forgejo's Docker registry:

services:
  myapp:
    image: "https://git.yourforgejo.com/youruser/yourrepo/myapp:latest"

Zip for Manual Upload

zip -r compose-example.zip app.yml docker-compose.yml

Then upload via the web UI or API.