From 3eb04b1a2bdf9e53231fe862cfd76327371a9741 Mon Sep 17 00:00:00 2001 From: gramanas Date: Sat, 12 Sep 2026 11:24:17 +0300 Subject: Initial multi-tenant blog host Go + Postgres application serving a management dashboard on the base domain and one public blog per subdomain. Markdown posts organised in pages, form-based theme customisation, image uploads stored in Postgres, JWT cookie sessions with CSRF, superadmin user management, RSS feeds. Docker/compose deployment and a Makefile-driven dev environment with seed data. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01Sd8UPWrvyYCLj97JexNw3A --- compose.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 compose.yml (limited to 'compose.yml') diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..4aa1dd3 --- /dev/null +++ b/compose.yml @@ -0,0 +1,33 @@ +# Production-style deployment: app + Postgres. Put a reverse proxy (nginx, caddy) +# in front of 127.0.0.1:8080 that forwards example.com and *.example.com with +# the original Host header. Configure via .env (see .env.example). +services: + app: + build: . + restart: unless-stopped + env_file: .env + environment: + DATABASE_URL: postgres://blogspace:${POSTGRES_PASSWORD:-blogspace}@db:5432/blogspace?sslmode=disable + ports: + - "127.0.0.1:${APP_PORT:-8080}:8080" + depends_on: + db: + condition: service_healthy + + db: + image: postgres:17-alpine + restart: unless-stopped + environment: + POSTGRES_USER: blogspace + POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-blogspace} + POSTGRES_DB: blogspace + volumes: + - pgdata:/var/lib/postgresql/data + healthcheck: + test: ["CMD-SHELL", "pg_isready -U blogspace"] + interval: 5s + timeout: 3s + retries: 20 + +volumes: + pgdata: -- cgit v1.2.3