Sign inSign up

jakeflanagan/stc-backend-flask

By jakeflanagan

•Updated 20 days ago

Flask + SQLite JSON API backend for Sole-Trader Companion - second-hand sales tracker.

Image
API management
Web servers
Databases & storage
0

847

jakeflanagan/stc-backend-flask repository overview

⁠STC Backend

Flask + SQLite JSON API backend for Sole-Trader Companion (STC) - tracks second-hand sales across Vinted, eBay, and other resale platforms. Pure JSON API under /api/v1/*; pair it with your own frontend or the STC apps.

Source: https://github.com/jakeflanagan/stc-backend-flask⁠

⁠Quick start

docker run -d \
  --name stc-backend \
  -p 5000:5000 \
  -v stc_data:/data \
  jakeflanagan/stc-backend-flask:latest

First run auto-generates settings.cfg (JWT secret, DB encryption key, admin password) inside /data and prints the one-time admin password to the container logs:

docker logs stc-backend

⁠Persistent data

Everything that must survive a restart - settings.cfg, auth.db, and per-tenant databases - lives under /data. Always mount a volume there; without it, every restart regenerates secrets and invalidates existing sessions and encrypted backups.

⁠Environment variables

VariableDefaultPurpose
GUNICORN_WORKERS4Number of gunicorn worker processes
SC_REDIS_URLunsetRedis URL for shared rate-limit state; required when running >1 worker

⁠Scaling beyond one worker

With GUNICORN_WORKERS > 1, rate limiting needs Redis-backed storage shared across processes - set SC_REDIS_URL, or keep a single worker.

⁠Health check

GET /api/v1/health - used by the image's built-in HEALTHCHECK.

⁠Tags

  • latest - most recent build off main
  • sha-<commit> - pinned to an exact commit
  • vX.Y.Z - tagged releases

⁠Full docs

Endpoint reference and deployment guide (Docker Compose + Caddy TLS example): see the GitHub repo⁠.

Tag summary

Content type

Image

Digest

sha256:4540f2f28…

Size

58.9 MB

Last updated

20 days ago

docker pull jakeflanagan/stc-backend-flask:sha-42ee002