This repository is a minimal example of how to structure a Forge-compatible application:
Forge is a small platform to deploy GitHub repos via Docker Compose, fronted by Traefik and Cloudflare Tunnels/Access. In this template’s context:
ddls.dev
) and lets you manually publish to prod (e.g., ddls.app
)Cf-Access-Authenticated-User-Email
web/
– Svelte app using Vite/api/info
and renders the Cloudflare Access email and environment variablesdesign_guidelines.md
backend/
– Go serverweb/
into the binary/api/info
with { message, email, env }
PORT
(default 8080)Dockerfile
– Multi-stage build: Bun (Svelte) → Go (embed) → alpine runtimedocker-compose.yml
– Defines api
and web
; Forge will inject Traefik labels via an overridedesign_guidelines.md
– Dark-only tokens and usage patternsdocker-compose.yml
web
) listening on an internal port (here: 8080)This template intentionally leaves Traefik labels off in docker-compose.yml
. Forge generates a forge.override.yml
per app/connector to set:
traefik_proxy
networkYour compose service should:
traefik_proxy
(created as an external network by Forge stack)Your Go backend receives the user email in header Cf-Access-Authenticated-User-Email
. The sample /api/info
endpoint returns it so the Svelte app can display it.
Forge supports env-specific variables. At deploy time the platform writes .env.dev
or .env.prod
and mounts them through an override file. This app simply prints all environment variables in /api/info
for demonstration.
Option 1: Docker Compose (dev override)
docker compose -f docker-compose.yml -f docker-compose.dev.yml up -d --build
Option 2: Bun + Go (outside Docker)
cd web && bun install && bun run build
cd ../backend && go build ./cmd/app && ./app
Visit http://localhost:8080
web
service unless you also update your Forge connectors.
.