Repository navigation
Self Hosting
Everything runs from compose.prod.yaml. Full guide: docs/deploy.md.
-
Point a DNS
Arecord at the server. -
Clone the repository and create
.envfrom.env.examplewith strongMYSQL_*values. SetSITE_URL=https://<your-domain>. If ports 3000 or 5000 are taken, setWEB_PORTandAPI_PORT. -
Start the stack:
docker compose -f compose.prod.yaml up -d --build
The API container migrates, loads the sourced seed rows and starts gunicorn on every start (both steps are safe to repeat). Both containers listen on
127.0.0.1only. -
Put a reverse proxy in front. With Caddy (which also gets the TLS certificate):
your-domain { encode zstd gzip reverse_proxy 127.0.0.1:3000 }
The web app proxies
/api/v1/*to the API, so one upstream is enough. The proxy must setX-Forwarded-For(Caddy does by default; with nginx addproxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;), because the rate limit keys on it. -
Check
https://<your-domain>/api/v1/health.
git pull
docker compose -f compose.prod.yaml up -d --buildOnly the settlement cycles and official closures live in MySQL, and both can be rebuilt with
flask --app wsgi seed. Back up the mysql-data volume anyway.
MarketClock by Syed Ahmer Shah · MIT License · support@ahmershah.dev · The repository's docs/ are the source of truth.
Use it
Run it
Build it
Repository