Skip to content

fghj

One hostname per service — the same one inside the docker network and out. Real HTTPS, real ports, no compose file.

fghj reads a small .fghj.yaml in each repo, follows the declared dependencies outward from whichever repos you have checked out, and brings up just that subgraph — with real HTTPS domains and no docker-compose.yml to hand-maintain.

from your laptop
psql -h db.web.shop.fghj.raw.internal -p 5432
curl https://minio.api.shop.fghj.internal/
from inside any container in the run
psql -h db.web.shop.fghj.raw.internal -p 5432
curl https://minio.api.shop.fghj.internal/

Byte-identical. One pair resolves through the host proxy and a virtual IP, the other through the run’s sidecar and Docker’s own network — and nothing on either side has to know which. So there’s no API_PUBLIC_URL twin, and no URL getting rewritten on its way to the browser.

Everything below falls out of that.

Presigned URLs that open

SigV4 signs the Host header. One name on both sides means the signature still matches when you paste the URL into a browser.

Every Postgres on 5432

Each node gets its own virtual IP, forwarded to the port its author declared. Three databases, one port number, all at once.

No tunnel for OAuth

Derived names are stable and already trusted, so they stay valid redirect URIs across restarts.

Cookies stop stomping

Cookies aren’t port-scoped, so :3000 and :3001 share a jar. Distinct hostnames and real TLS fix it — and make Secure and __Host- testable.

Per-tenant subdomains

A certificate minted per hostname, on first sight. No /etc/hosts edit, no regeneration, any depth of subdomain.

Port 80 stays yours

80 and 443 are bound on 127.222.0.1, never 0.0.0.0. Your nginx keeps serving.

All six, with the failure modes they replace →

.fghj.yaml
version: "2.0"
include:
payments: git@github.com:acme/payments-service.git
services:
checkout:
build: .
ports:
"8080":
primary: true
environment:
DATABASE_URL: postgres://app:dev@${FGHJ_SERVICE_FQDN:postgres}:5432/app
PAYMENTS_URL: http://${FGHJ_SERVICE_FQDN:payments/api}:8080
depends_on:
postgres: {condition: service_healthy}
payments/charge: {}
postgres:
image: postgres:16
ports: ["5432"]
healthcheck:
test: ["CMD", "pg_isready"]
flows:
checkout: [checkout]

It reads like a Compose file because it mostly is one. What’s added: include: names the other repos this one talks to, and payments/charge is a flow the payments repo publishes — the slice of itself it’s willing to be depended on by. You never name another repo’s services, so its team can change them without breaking you.

Terminal window
fghj wire git@github.com:acme/checkout-service.git

That repo now answers at https://checkout.checkout-service.shop.fghj.internal with a certificate your system already trusts, and its Postgres at postgres.checkout-service.shop.fghj.raw.internal:5432. Neither address is written down anywhere — both are derived from the graph.

Runs on macOS (Apple Silicon) through Homebrew, and on Ubuntu 22.04 or newer (amd64, arm64) through apt, which keeps it updated:

Terminal window
brew install mlnja/tap/fghj && sudo brew services start fghj # macOS
sudo apt install fghj # Ubuntu, from apt.mlops.ninja

Installation has the one-time apt setup and what each OS changes on your machine.