Appearance
Install Foliwake with Docker
One container runs everything: the dashboard, the API the foliwake command signs in to, and your sites, live and in preview, on one port. Everything it keeps is in one volume.
Start it
You need Docker with Compose 2.24 or newer (Docker Desktop, OrbStack, colima, or the Docker engine with the Compose plugin) and the foliwake command (install the command line).
The image is private for now. Sign in to GitHub's registry once with a personal access token (classic) that has only the read:packages scope; foliwake never asks for it:
sh
docker login ghcr.io -u <your GitHub user> # paste the token as the password
foliwake docker installinstall asks what it needs and shows the defaults:
text
┌ Install Foliwake in Docker
◇ Instance name · foliwake
◇ Port on this computer (8080 is free) · 8080
◇ Reachable from · This computer only (127.0.0.1)
◇ Public address (browsers and `foliwake login`) · http://localhost:8080
◇ Owner e-mail (the first account; no mail is sent) · you@example.com
◇ Where to keep the sites · The data volume
◇ Traces · Off
◇ Image · ghcr.io/foliwake/foliwake:main
◇ Ready: instance foliwake · http://localhost:8080 (127.0.0.1:8080) · data volume foliwake_data · no traces · … Install? · Yes
Started; healthy after 6 s.
Foliwake is ready at http://localhost:8080/
Owner you@example.com: one-time sign-in link (15 minutes): http://localhost:8080/auth/api/magic-link/verify?token=…
◇ Open it in your browser now? · Yes
Next: foliwake login http://localhost:8080 · foliwake create mysiteThen it pulls the image, starts the container, waits until it is healthy and prints the owner's one-time sign-in link (valid 15 minutes). Open the link to reach the dashboard. Treat the link and the container log as sensitive: until the owner has signed in once, every start prints a new link, and anyone who reads it within its 15 minutes can sign in as the owner. A new link, at any time:
sh
foliwake docker linkWithout a terminal (a script, a provisioning tool) nothing is asked: the flags and the defaults decide, and what has no default is refused before anything changes (exit code 2):
sh
foliwake docker install --owner-email you@example.com --no-interactiveInstances
An instance is a Compose project on the current Docker engine (your docker context or DOCKER_HOST). Its containers, volumes and network carry dev.foliwake.* labels, and every foliwake docker command finds the instance by them, never by the folder you are in. With one instance its name can be left out; with several, name it (a terminal asks which). Anyone who can use the engine can set labels, so a label that is not an instance name (1 to 40 lowercase letters, digits and dashes) is skipped with a warning: no command acts on those containers and volumes or prints the label's control characters.
| Command | What it does |
|---|---|
foliwake docker install [name] | Asks, writes the settings, pulls, starts, prints the sign-in link |
foliwake docker list | All instances on this engine: status, address, image, traces, data volume |
foliwake docker status [name] | Health, image, ports, address, traces, storage; secrets only as "set" |
foliwake docker start / stop / restart [name] | The containers; data and settings stay |
foliwake docker logs [name] [-f] [--since 10m] [--service jaeger] | The log (it holds sign-in links: keep it private) |
foliwake docker link [name] [--email …] | A new one-time sign-in link |
foliwake docker update [name] [--image …] [--no-backup] | Pulls the image; when it changed, backs up the data, recreates the server and drops cached HTML; prints the rollback command |
foliwake docker backup [name] [--out …] | The data volume as one private archive on this computer; the server may run |
foliwake docker restore [name] --from … [--replace] | That archive back into the volume, the instance stopped |
foliwake docker configure [name] --traces … / --cache … / --port … / … | Changes settings and recreates; the data volume stays |
foliwake docker remove [name] [--delete-data] | Removes the containers; keeps the data volume unless asked |
foliwake docker exec [name] -- <args> | The CLI inside the container, e.g. -- account invite --email … |
A second instance on the same computer is another name: foliwake docker install staging offers the next free port (8081) and keeps everything apart (staging-foliwake-1, volume staging_data). A port typed by hand that is taken (by another instance or another program) is never swapped silently: in a terminal you are offered the next free one, without one the command stops. A name already used by a Compose project that is not a Foliwake instance is refused; that project is left alone.
The settings of an instance are on this computer in ~/.config/foliwake/docker/<name>/ (or under $FOLIWAKE_CONFIG_DIR): compose.yaml, which names variables only, and .env (mode 0600) with the answers, secrets included. You never need to go there; update and configure use it. Without that folder (another admin installed the instance) start, stop, restart, logs, link, status and remove still work.
Secrets
The S3 key and OTLP headers are never flags (they would show in ps and your shell history) and never printed. In a terminal they are asked with hidden input; without one, install reads them from its environment:
sh
FOLIWAKE_STORAGE_ACCESS_KEY_ID=… FOLIWAKE_STORAGE_SECRET_ACCESS_KEY=… \
foliwake docker install prod --public-origin https://foliwake.example.com --domain example.com \
--owner-email you@example.com --storage s3 --storage-endpoint https://s3.example.com --no-interactiveThey are kept in the instance's .env (0600) and passed to the container's environment. Anyone who can use the Docker socket can read a container's environment (docker inspect): the socket is root on the host.
Traces
--traces jaeger (or «Jaeger beside the server») runs a Jaeger of the instance's own: its UI on http://127.0.0.1:16686/ (the first free port from 16686, on this computer only; it has no sign-in), traces in memory or, with --jaeger-store badger, on disk for a week. --traces external --otlp-endpoint https://… sends them to your own OTLP collector. With Jaeger, FOLIWAKE_TRACE_URL_TEMPLATE points at that UI (http://127.0.0.1:<port>/trace/{traceId}), so the dashboard and foliwake operation get link each operation to its trace; configure keeps it in step with the UI port and removes it with --traces none. Change it later with foliwake docker configure --traces none|jaeger|external.
Update, roll back, remove
sh
foliwake docker update # pull; when the image changed: back up, recreate, refresh cached HTML
foliwake docker update --no-backup # the same without the backup
foliwake docker update --image ghcr.io/foliwake/foliwake:sha-<short> # pin a tag or digest (also: roll back)
foliwake docker remove # containers gone; data kept in foliwake_data
foliwake docker remove --delete-data # also the data: type the name to confirm (in a terminal, always);
# without a terminal --delete-data --yesA failed pull (a registry sign-in that expired, no network) stops update and changes nothing. An image you built on this engine is installed with --pull missing; update cannot check it against a registry, and pins one with update --image <id> --pull missing (the rollback command update prints for a local build). When the image changed, update first backs up the data volume (docker backup, below) and, once the new server runs, drops every site's cached HTML from its caches (foliwake data refresh-caches in the container), since the old engine composed it; a cache it cannot reach is reported and the update stands. After remove, foliwake docker list shows the instance as "data only", and foliwake docker install with the same name offers to use its sites and accounts again (no owner e-mail needed then).
Without the CLI: docker run or Compose
The same image runs without foliwake docker:
sh
docker run -d --name foliwake -p 127.0.0.1:8080:8080 -v foliwake:/data \
-e FOLIWAKE_OWNER_EMAIL=you@example.com ghcr.io/foliwake/foliwake:main
docker logs foliwakeFOLIWAKE_OWNER_EMAIL names the owner account (no mail is sent). The log names the address and prints the owner's one-time sign-in link:
text
Foliwake is ready at http://localhost:8080/ …
Owner you@example.com: one-time sign-in link (15 minutes; …): http://localhost:8080/auth/api/magic-link/verify?token=…
CLI: foliwake login http://localhost:8080A new link: docker exec foliwake foliwake account link --email you@example.com. deploy/docker/compose.yaml in the repository does the same with Compose (and Jaeger in its observability profile); foliwake docker does not manage containers started this way.
Sign in the CLI
The instance answers the foliwake command on its public address, the same one as the dashboard: there is no separate API address or setting. The container itself tells them apart (a request with the CLI's sign-in token goes to the API, the dashboard's session to the dashboard), so it works the same with or without a proxy in front.
On this computer, with the default address:
sh
foliwake login http://localhost:8080 # opens the browser; approve the code where you are signed in to the dashboard
foliwake whoami
foliwake site status --site mytest --server http://localhost:8080With a domain behind your HTTPS proxy (below), use that address:
sh
foliwake login https://foliwake.example.comThe approval page and the token use the public address, so it must be the one you type (foliwake docker configure --public-origin … changes it). Without a system keychain add --insecure-storage. Which commands then go to the server: accounts, roles and sign-in.
Create a site on it
From your computer, one flow:
sh
foliwake create mytest # Connect to a Foliwake server? → http://localhost:8080 → Create a new site "mytest"
cd mytest
foliwake preview # http://mytest.preview.localhost:8080/
foliwake publish # http://mytest.live.localhost:8080/When this computer is not signed in to the server yet, choose "Another server…" (Enter takes http://localhost:8080): create starts the same sign-in as foliwake login http://localhost:8080, opens the browser and shows the code; approve it where you are signed in to the dashboard. Ctrl+C or a failed sign-in keeps the project; connect it later with foliwake login http://localhost:8080 and foliwake site create mytest in the folder.
The folder is bound to this server and site by .foliwake/connection.json, so preview and publish go there even when you sign in to other servers later. With two Docker servers (for example a second one on -p 127.0.0.1:9000:8080 with FOLIWAKE_PUBLIC_ORIGIN=http://localhost:9000), create lists both, and site create / site link ask which (in a terminal) or refuse until you pass --server. In scripts: foliwake create mytest --no-interactive --server http://localhost:8080 --create-site.
Browsers resolve *.localhost to your computer, so no DNS is needed. The preview opens for any signed-in account of the site's organisation. Each site has its own preview token, derived from a secret generated into /data; to give a script one, set <SITE>__PREVIEW_TOKEN (for example MYTEST__PREVIEW_TOKEN, at least 32 characters) and use HTTP Basic preview:<token>.
Website history
Every published version of a site stays readable for the site's admins. In the dashboard, History lists the versions; Open gives a one-time link to that version on its own host, r-<release>--<site>.<history domain>, served by the same container on the same port. Without a signed-in admin session the hosts answer 401; a link works once.
- On this computer the history domain is
history.localhost:http://r-<release>--mytest.history.localhost:8080/. - With a domain it is
history.<FOLIWAKE_DOMAIN>(orFOLIWAKE_HISTORY_DOMAIN): add*.history.example.comto your DNS and proxy (below).
Links keep the port of the public address. A server whose configuration names addresses.historyDomain uses that, unless FOLIWAKE_HISTORY_DOMAIN is set.
When *.localhost does not resolve. Chrome, Firefox and Edge send every *.localhost name to this computer. On macOS 26 the system resolver does too (checked with dscacheutil -q host -a name a.b.localhost), and so do curl 8.7 and Node.js; Safari uses that resolver, but it was not tried. A resolver that answers nothing for such names (some Linux set-ups without systemd-resolved) needs the name pinned per request or in /etc/hosts:
sh
curl --resolve 'r-<release>--mytest.history.localhost:8080:127.0.0.1' http://r-<release>--mytest.history.localhost:8080/
# or one line per host in /etc/hosts: 127.0.0.1 mytest.live.localhost r-<release>--mytest.history.localhostThe same holds for <site>.live.localhost and <site>.preview.localhost.
Drupal editor on the instance
The integration service that lets authors update previews and publish from Drupal runs inside the container: put the connections file in the volume as /data/foliwake.connections.json and restart. Its host is review.<FOLIWAKE_DOMAIN> on the same port (FOLIWAKE_REVIEW_HOST for another name); the start log names it. The connection's secrets go into the instance's .env; Drupal must be reachable from the container (not 127.0.0.1). Step by step: connect the Drupal editor. Drupal itself, its database and cron run outside the package.
Release code from CI
A frontend repository's workflow deploys a commit to the instance with the CLI's --server mode and a CI key, a key of no person that may only deploy code and update branch previews of the sites it names:
sh
# Once, signed in as an admin of the organisation:
foliwake account keys create --site mysite --label "GitHub Actions mysite" --server https://foliwake.example.com
# → FOLIWAKE_TOKEN=fwci_… (shown once; store it as a secret of the repository)
printf %s "$READ_TOKEN" | foliwake credential set MYSITE__CODE_TOKEN --from-stdin --server https://foliwake.example.com
# In the workflow (FOLIWAKE_SERVER and FOLIWAKE_TOKEN from the repository's secrets):
foliwake code deploy --site mysite --rev "$GITHUB_SHA" --sequence "$GITHUB_RUN_ID"The site must know its repository: create it with foliwake site create mysite --repository https://github.com/acme/mysite (the server's checkout then has it as origin). The server fetches the commit from there over HTTPS when its checkout does not have it; for a private repository it sends the read token stored as <SITE>__CODE_TOKEN (on GitHub a fine-grained token with Contents: read on that repository only). The server never fetches the commit by its SHA alone: it fetches the tip of the branch the commit may come from and refuses a commit that is not that tip or one of its ancestors (CODE_REVISION_NOT_ON_BRANCH; a revision given as a branch name must be that branch, and means its tip in the repository), so a commit the host serves only by SHA (on GitHub, one from a fork of the repository, or one force-pushed away) is never released. code deploy takes commits of code.defaultBranch (main); a site whose released code is built on another branch names it with foliwake site set --site mysite code.deployBranch release. branch update <branch> takes commits of that branch; a site whose CI commits each branch's build to builds/<branch> sets code.buildPrefix builds/ so those commits are taken too. The release is still checked against exactly that commit (roll out frontend code). The key cannot publish pages, roll back, read the dashboard or make keys; foliwake account keys list shows the keys (never the key itself) and foliwake account keys revoke ci_… stops one at once. Making and revoking a key is recorded in the audit.
CI key expiry and rotation
A CI key works for 365 days from when it is made, so a leaked key stops by itself. The core operation account.keys.create takes expiresInDays (1 to 730) for another time; the CLI's flag for it, --expires-in <days>, comes with a later @foliwake/cli release. The key list (foliwake account keys list --json) gives each key's expiresAt (milliseconds since 1970). A pipeline whose key has expired is refused with CI_KEY_EXPIRED: create a new key and update the CI secret.
A key made before keys had an expiry has expiresAt: null: it keeps working until it is revoked. Rotate it now, and any key before it expires, in two steps, so the pipeline never runs without a working key:
- Make a new key for the same sites and put it in the repository's secret
FOLIWAKE_TOKENin place of the old one:foliwake account keys create --site mysite --label "GitHub Actions mysite" --server https://foliwake.example.com. - After the next workflow run has passed with the new key, revoke the old one:
foliwake account keys revoke ci_… --server https://foliwake.example.com(its ID is inaccount keys list).
Content from Google Drive, Git or Drupal
The image carries every connector shipped with the engine, and all of them are on: Google Drive folders (Markdown), Git repositories (Markdown), Google Docs and Drupal. foliwake docker exec -- source plugins lists them. A source reads its credentials by name, never from the site configuration: store the values with foliwake credential set (kept in the data volume, no restart needed). The instance's .env is for the instance's own settings.
- Connect a Google Drive folder: a Google service account, its JSON key stored with
foliwake credential set --from-file, the folder shared with the account's e-mail address. - Connect a Git repository: an HTTPS address and, for a private repository, a read-only token.
- Publish from Drupal.
A community connector that is not shipped with the engine still needs a plugin list file (FOLIWAKE_PLUGINS) and foliwake docker update; see content sources. It runs inside the server process and can read every site's credentials and the instance's secrets: install only connectors you have reviewed.
Move a project to another server
A folder is linked to one site on one server. To move it, unlink it and connect it again:
bash
foliwake site unlink # removes .foliwake/connection.json; prints the server and site
foliwake site create mytest --server http://localhost:9000 # or: site link <id> --server …site unlink sends nothing to the server, so the site, its releases and its pages stay where they were. In a folder with no link it says so and exits 0. It leaves a connection.json it cannot read alone unless you pass --force.
Where things are
Everything is in the /data volume. Back it up with foliwake docker backup (below).
| Path | Contents |
|---|---|
foliwake.config.json | The server configuration (addresses; the sites themselves are in the database below) |
.foliwake.config.json.auth/ | The database (accounts, organisations, sites), sessions and the sign-in secret |
foliwake.env | Generated secrets (the preview secret); private |
storage/ | Releases, pages and media of every site (one folder per site) |
sites/, state/ | Each site's code checkout and working state |
Restarting or recreating the container with the same volume keeps everything. The volume is <instance>_data (foliwake_data for the default instance; foliwake with the docker run above). foliwake docker remove --delete-data (or docker volume rm …) deletes it all.
Back up and restore
sh
foliwake docker backup # → ~/.config/foliwake/docker/<name>/backups/<name>-<time>.tar.gz
foliwake docker backup --out ./foliwake.tar.gz
foliwake docker stop
foliwake docker restore --from ./foliwake.tar.gz --replace # type the name to confirm (or --yes)
foliwake docker startbackup runs while the server runs: every database in the volume is copied consistently (SQLite VACUUM INTO), the other files as they are; caches the server rebuilds (media variants, source download caches) are left out. Each database is consistent in itself; a publication that runs during the backup may be in one database and not yet in another, so take backups between publications when you can. The archive holds the server's secrets (foliwake.env, the sign-in secret, stored credentials): it is written private (0600); keep it so. A bucket on S3 or R2 is not in it: back that up with your provider.
restore refuses while the instance runs. An empty volume takes the archive as it is; a volume with data needs --replace, which deletes that data first. To move to another computer, install an instance there, then stop it and restore with --replace. Without the CLI: docker run --rm -v foliwake_data:/data -v "$PWD":/backup ghcr.io/foliwake/foliwake:main data backup --out /backup/foliwake.tar.gz (and data restore --from … --replace with the server stopped).
Settings
foliwake docker install and configure set the common ones. All settings are environment variables (docker run -e NAME=value). With foliwake docker, add the rarer ones as lines to the instance's .env (for example FOLIWAKE_TRACE_ORIGIN_RATIO=0.1 or MYSITE__PREVIEW_TOKEN=…), above the block marked managed by foliwake docker, which foliwake docker keeps last in the file: every line reaches the server container, and foliwake docker never rewrites a line outside its block. Settings that install and configure manage are set with them, not by hand. Compose takes the last definition of a variable in the file, so the block's values win; after each change foliwake docker asks Compose what it reads, and if a value differs (or a quote left open runs into the block) it puts the previous files back and names the setting. Then run foliwake docker update, which recreates the container with them (restart does not). All are optional except FOLIWAKE_OWNER_EMAIL, which the first start (an empty /data volume) needs.
| Variable | Default | Meaning |
|---|---|---|
FOLIWAKE_PUBLIC_ORIGIN | http://localhost:8080 | Where browsers and the CLI reach the server. Set it when you publish another port (-p 9000:8080 → http://localhost:9000) or use a domain (https://foliwake.example.com). |
FOLIWAKE_DOMAIN | the public origin's host | Sites get <site>.live.<domain> and <site>.preview.<domain>. |
FOLIWAKE_REVIEW_HOST | review.<domain> | The Drupal editor integration's host (Drupal's API and the review pages), when /data/foliwake.connections.json exists (connect the Drupal editor). |
FOLIWAKE_HISTORY_DOMAIN | history.<domain> | Website history: a past version opens on r-<release>--<site>.<history domain>, for signed-in admins only (History in the dashboard). Must not overlap the live and preview domains. |
FOLIWAKE_OWNER_EMAIL | — (required at the first start) | The owner account made at the first start. |
FOLIWAKE_STORAGE_ENDPOINT | file:///data/storage | Where sites are stored: a folder in the volume, or an S3-compatible endpoint (AWS S3, Cloudflare R2, MinIO). |
FOLIWAKE_STORAGE_ACCESS_KEY_ID, FOLIWAKE_STORAGE_SECRET_ACCESS_KEY | — | The S3 key; required with an S3 endpoint. |
FOLIWAKE_STORAGE_REGION | us-east-1 | The S3 region (auto on R2). |
FOLIWAKE_STORAGE_BUCKET | foliwake-{org}-{site} | The bucket name of each new site. |
FOLIWAKE_STORAGE_CREATE_BUCKETS | 1 | 0: the key may not create buckets; create each site's bucket yourself first. |
FOLIWAKE_TRUST_PROXY | — | 1 behind a reverse proxy that sets X-Forwarded-For. |
FOLIWAKE_AUTH_SECRET, FOLIWAKE_PREVIEW_SECRET | generated into /data | The sign-in secret and the secret sites' preview tokens are derived from; set them (at least 32 characters each) to manage them yourself. |
<SITE>__PREVIEW_TOKEN | derived | One site's preview token, for scripts (HTTP Basic preview:<token>). Set by hand, it needs at least 32 characters: with a shorter one the server does not start. |
OTEL_EXPORTER_OTLP_ENDPOINT | — (no traces) | Send traces of operations to an OTLP/HTTP collector (see Traces with Compose by hand; with foliwake docker, Traces). |
FOLIWAKE_TRACE_URL_TEMPLATE | — (trace IDs only) | The address of a trace in your collector's UI, with {traceId} once, e.g. http://127.0.0.1:16686/trace/{traceId}. |
Rotating preview tokens. The derived tokens are computed when the server starts and when a site is added or changed. To rotate all of them, set a new FOLIWAKE_PREVIEW_SECRET (at least 32 characters; or edit it in /data/foliwake.env) and restart the container. A token you set yourself (<SITE>__PREVIEW_TOKEN) is never derived: change it in the environment and restart. Open browser previews then pass through the sign-in hand-over again. | FOLIWAKE_MAIL, FOLIWAKE_MAIL_FROM, FOLIWAKE_RESEND_API_KEY | no mail | Send sign-in links by e-mail instead of account link. |
The storage settings become provisioning.storage of /data/foliwake.config.json at the first start, and every site created afterwards (by sites.create) takes its storage from there. The environment wins: when a FOLIWAKE_STORAGE_* setting (endpoint, bucket, region, create-buckets) is set and the file's provisioning.storage differs, the next start replaces it with the environment's and logs which fields changed (names, endpoints and buckets only). So changing those variables (in docker run -e, your Compose file or the instance's .env) and recreating the container changes the storage of new sites; you never edit the file in the volume. foliwake docker configure has no storage flags yet. With no FOLIWAKE_STORAGE_* set, the file's provisioning.storage stays as it is. Existing sites keep their storage either way: a site's storage is part of its entry in the site database.
On a server with a domain
Point DNS for foliwake.example.com, *.live.example.com, *.preview.example.com, *.history.example.com (and review.example.com for the Drupal editor) at the server, and put an HTTPS proxy in front of port 8080. With Caddy (wildcard certificates need its DNS plugin; or list the hosts one by one):
text
foliwake.example.com, *.live.example.com, *.preview.example.com, *.history.example.com, review.example.com {
reverse_proxy 127.0.0.1:8080
}sh
foliwake docker install --port 8080 --public-origin https://foliwake.example.com --domain example.com \
--owner-email you@example.comThe port stays on 127.0.0.1 (the proxy reaches it there); install sets FOLIWAKE_TRUST_PROXY=1 for a public address that is not localhost, and only while the port is on 127.0.0.1: with --bind 0.0.0.0 it leaves it off and says why. The proxy passes every path through, so foliwake login https://foliwake.example.com works as well. Sign-in limits then count the client address the proxy adds to X-Forwarded-For; keep the port on 127.0.0.1, because a client that reaches the port directly could name any address there. Without the CLI:
sh
docker run -d --name foliwake -p 127.0.0.1:8080:8080 -v foliwake:/data \
-e FOLIWAKE_OWNER_EMAIL=you@example.com \
-e FOLIWAKE_PUBLIC_ORIGIN=https://foliwake.example.com -e FOLIWAKE_DOMAIN=example.com \
-e FOLIWAKE_TRUST_PROXY=1 ghcr.io/foliwake/foliwake:mainA cache (Varnish or a CDN) in front of the live hosts is optional.
A Varnish of the instance
sh
foliwake docker install --cache varnish # or later: foliwake docker configure --cache varnish
foliwake docker configure --cache varnish --cache-port 8091
foliwake docker configure --cache none # remove it--cache varnish adds a Varnish container (varnish:9.0.4, pinned) on a port of its own (the first free one from 8090, on the same address as the server). The server writes its configuration from the shipped multi-site template: every site's live hosts, each site with its own purge token (kept in that site's state), and writes it again when a site is created or changed; Varnish reloads it within a few seconds. Publications then refresh it themselves (BAN of the pages they change, with the site's token). Point your proxy's live hosts at the cache port and everything else at the server:
text
*.live.example.com {
reverse_proxy 127.0.0.1:8090
}
foliwake.example.com, *.preview.example.com, *.history.example.com, review.example.com {
reverse_proxy 127.0.0.1:8080
}Hosts Varnish does not know (the dashboard, previews, a site created a moment ago) are passed to the server uncached, never cached for another site. foliwake docker status shows the cache address; docker update drops every site's cached HTML after an engine update.
Behind a proxy with its own sign-in
A team that keeps everything behind its own HTTP Basic sign-in in the proxy (a staging gate) needs no lines per site either. Two generic rules cover every site, also one created from the CLI a minute ago:
text
*.live.example.com {
basic_auth { team <bcrypt hash> }
reverse_proxy 127.0.0.1:8090 { # the cache (or 8080 without one)
header_up -Authorization # the team's credential is not the site's business
}
}
*.preview.example.com {
basic_auth { team <bcrypt hash> }
reverse_proxy 127.0.0.1:8080 # the instance's preview gate handles the rest
}Do not swap the team's credential for a site's preview token in the proxy. A browser that opens a preview goes through the instance's own hand-over: it is sent to the dashboard (signed in there, behind the same team gate), back with a one-time ticket, and gets a cookie for that preview host; with the cookie the instance adds the site's preview credential itself and ignores the team's Basic credential the browser still sends. A script uses preview:<token> (<SITE>__PREVIEW_TOKEN) and the proxy's own sign-in is then in the way: give scripts a path around it (for example a host the proxy does not protect), or run them on the server against port 8080. The dashboard and /api/* keep their usual rule: the CLI's Bearer requests and /api/auth/* must reach the instance without the team's sign-in.
Compose
foliwake docker generates a Compose project per instance (above). deploy/docker/compose.yaml in the repository runs the same image with these settings in one file, for maintainers and as a fallback; it is optional.
Traces with Compose by hand
Traces are off unless you send them somewhere. foliwake docker install --traces jaeger (or configure --traces jaeger) runs a Jaeger of the instance and sets the trace links below for it (Traces above). With Compose by hand, the observability profile runs a Jaeger beside the server and points the server at it:
sh
docker compose -f deploy/docker/compose.yaml -f deploy/docker/compose.observability.yaml --profile observability up -dIts UI is on http://127.0.0.1:16686/ (this computer only; it has no sign-in). The override also sets FOLIWAKE_TRACE_URL_TEMPLATE to that UI, so the dashboard's Activity and the «Deploying» card link each operation to its trace, and foliwake operation get prints the address. With your own collector, set OTEL_EXPORTER_OTLP_ENDPOINT and, for links, FOLIWAKE_TRACE_URL_TEMPLATE to its trace page with {traceId} in place of the ID (an http or https address); without a template the dashboard shows the trace ID with a Copy button.
