Files
sh-agentsandsh-agents 57d67e5ff0 store: serve the pages as built, settings from /api/config (#8097)
* store: serve the pages as built, settings from /api/config

* store: badges page reads its Stripe key from the API

* store: badges worker waits for a slow page, not the old build

* store: badges page kept a stale Stripe key after the tab returned

* store: names page read settings the service no longer writes

* store: Caddy had no built sites to serve once the export was gone

* store: two page folders where one mount would do

* store: example Caddyfile missed the bare /api and /webhooks paths

* store: a hand-written page copy script where rsync does it

---------

Co-authored-by: sh-agents <350651734+sh-agents@users.noreply.github.com>
2026-11-14 12:26:54 +00:00
..

Store service deployment

  • compose.yml: the service, built from Dockerfile, with ./config mounted read-only, and the webapps service, which copies both built sites into ./webapps/badges and ./webapps/names for Caddy with rsync and exits.
  • compose.dev.yml: adds a local chain and database to compose.yml, for development.
  • Dockerfile, Dockerfile.dockerignore: the image, built from the repository root.
  • store_service.ini.example: the template of config/store_service.ini.
  • dev/chain.sh: the dev chain, which also writes the dev config/store_service.ini.
  • dev/contract-run.sh: runs the names webapp's end-to-end cases against the service.
  • config/, webapps/, data/, .env: local state, gitignored.

Production, with PostgreSQL at BADGE_DB_CONN (by default postgresql://simplex@127.0.0.1:5432/badge_service), and the ini filled in before the last command:

git submodule update --init ../../apps/simplex-domains
install -d -m 700 config
install -d webapps
install -m 600 store_service.ini.example config/store_service.ini
docker compose up -d --build

Development, from a fresh clone:

git clone https://github.com/simplex-chat/simplex-chat && cd simplex-chat
git checkout names && git submodule update --init apps/simplex-domains
cd scripts/store-service
echo "COMPOSE_FILE=compose.yml:compose.dev.yml" > .env
install -d webapps
docker compose up -d --build

The names site is then on http://127.0.0.1:8081, the badges site on http://127.0.0.1:8080.

Everything else is in apps/simplex-store-service/README.md.