Publishing a Docker service
A sidecar publishes an existing application without changing the application itself.
Minimal pattern
Section titled “Minimal pattern”services: app: image: example/app:latest networks: [private]
knotroute: image: ghcr.io/localzet/knotroute-sidecar:latest restart: unless-stopped networks: [private] volumes: - knotroute-data:/data environment: KNOTROUTE_NETWORK_ID: "kn_..." KNOTROUTE_BEACONS: "https://beacon-a.example,https://beacon-b.example" KNOTROUTE_SERVICE_NAME: "web" KNOTROUTE_SERVICE_TARGET: "app:8080"
networks: private:
volumes: knotroute-data:The application needs no public host port if it is intended to be KnotRoute-only.
Persistent identity
Section titled “Persistent identity”/data volume. Losing the service identity creates a different canonical .knot address.
Address discovery
Section titled “Address discovery”Read docker compose logs knotroute; the sidecar prints the published service address and target.
Health
Section titled “Health”The sidecar exposes a health endpoint (commonly :9090/healthz) for process checks. Use a real remote .knot request for end-to-end monitoring.