[foostash]docsdev
github ↗

Self-host the server

Your server, your Postgres, your keys. The repo ships a compose file wiring the published GHCR image to Postgres.

Quick start with Docker Compose

bash
git clone https://github.com/Omotolani98/foostash.git
cd foostash

docker compose pull
docker compose up -d

curl http://localhost:8400/v1/health
# {"status":"ok","version":"v0.2.3","database":"ok"}

Defaults

SettingValue
API port8400 (host and container)
Postgrespostgres:16-alpine · user/pass/db foostash
Data volumefoostash-pgdata (Docker-managed)
Imageghcr.io/omotolani98/foostash:latest
DB URLpostgres://foostash:foostash@postgres:5432/foostash?sslmode=disable

Pin a release, or build locally

bash
FOOSTASH_IMAGE_TAG=v0.2.2 docker compose up -d

docker compose up -d --build

Run without Docker

bash
export FOOSTASH_PG_URL="postgres://foostash:foostash@localhost:5432/foostash?sslmode=disable"
make build
./bin/foostash serve --addr :8400

Makefile helpers: make docker-build, make docker-up, make docker-down.

Operational notes

  • Migrations run at startup. Every foostash serve applies pending SQL migrations idempotently — no separate migrate step.
  • Healthcheck. GET /v1/health pings the DB with a 2s timeout. Compose uses it for container health; load balancers can too.
  • Data lifecycle. docker compose down keeps the foostash-pgdata volume. Use down -v to wipe it.
  • TLS. The server speaks plain HTTP. Terminate TLS in front (Caddy, nginx, Cloudflare, a managed LB) before exposing it to the internet.