129681624d39d2bffff7b65b7bc7a1bd1ec24207
The ${STAMP_MONITOR_ADMIN_TOKEN} form rendered correctly under `docker
stack config` -- ADMIN_TOKEN: len=64 -- and still deployed with an EMPTY
value, twice, on a shell that had the variable exported. The result is a
service that starts, polls, alerts and serves its dashboard while every
admin route returns 503: it looks healthy and can show nothing.
A secret is mounted as a file, so there is no substitution left to
silently resolve to "". Same shape the homelab monitor already uses.
Create it once on the host:
printf %s "$TOKEN" | docker secret create stamp_monitor_admin_token -
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YLYiaPYror1vLKApYKrxTu
DevOps
This repo manages the two environments for the Token4Token hosted gateway:
local/— docker-compose files for running development and testing environments locally. Tests run inside Docker, no host-side Bun needed.hostinger/— Docker Swarm stack files for the remote production cluster on Hostinger.
The layout mirrors cipherdolls/devops.
Local development
cd local
make up # bring the dev stack up (postgres, redis, bee, anvil, api, worker)
make logs # tail
make down # clean shutdown
The dev compose mounts ../../hosted-gateway/src so file changes hot-reload
inside the container (bun run --watch).
Local testing
Every E2E spec runs inside Docker against a fresh stack (anvil fork of Gnosis, deployed contracts, a t4t-provider container against a stub Ollama).
cd local
make test SPEC=accounts # run one spec
make test-all # run every spec sequentially
make test brings up postgres + redis + anvil + bee + t4t-provider + hosted
api + worker, then runs the bun test container against them. After the run
it tears everything down (-v --remove-orphans).
Hostinger / production
Stack files in hostinger/ are applied via docker stack deploy from the CI
pipeline. Not relevant for local development.
Languages
Makefile
77.2%
TypeScript
18.7%
Dockerfile
4.1%