Go backend with Gin, pgx, Valkey (go-valkey), and PostGIS. Domains: - Market search with PostGIS geo-queries (ST_DWithin, ST_Distance), German full-text search (tsvector + ILIKE fallback for compound words), date range filtering, pagination, and slug-based detail endpoint - Auth with email+password (bcrypt), JWT access tokens (15min), session tokens (30d, dual Valkey+Postgres storage), OAuth (Google/GitHub/Facebook), magic links, and TOTP 2FA - User profile with CRUD, soft-delete (30d grace), and restore Infrastructure: - 6 database migrations (users, sessions, oauth_accounts, magic_links, markets with PostGIS+FTS, totp_secrets) - Middleware: recovery, request ID, structured logging (slog), CORS, per-IP rate limiting, JWT auth - Seed data: 10 medieval markets across DACH region - Docker Compose (PostGIS 17 + Valkey 8), multi-stage Dockerfile, Woodpecker CI pipeline, Kubernetes manifests - Justfile, golangci-lint config, env example
33 lines
629 B
YAML
33 lines
629 B
YAML
services:
|
|
postgres:
|
|
image: postgis/postgis:17-3.5
|
|
ports:
|
|
- "5432:5432"
|
|
environment:
|
|
POSTGRES_USER: marktvogt
|
|
POSTGRES_PASSWORD: marktvogt
|
|
POSTGRES_DB: marktvogt
|
|
volumes:
|
|
- pgdata:/var/lib/postgresql/data
|
|
healthcheck:
|
|
test: ["CMD-SHELL", "pg_isready -U marktvogt"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
valkey:
|
|
image: valkey/valkey:8-alpine
|
|
ports:
|
|
- "6379:6379"
|
|
volumes:
|
|
- vkdata:/data
|
|
healthcheck:
|
|
test: ["CMD", "valkey-cli", "ping"]
|
|
interval: 5s
|
|
timeout: 5s
|
|
retries: 5
|
|
|
|
volumes:
|
|
pgdata:
|
|
vkdata:
|