Files
Mikael BergandPaperclip 5ec56f20d5 feat: k8s manifests, Plausible self-host, Dockerfile, CI, and deploy runbook for using.cash
- k8s/using-cash/: namespace, deployment (2 replicas, rolling), service, ingress
  - apex (using.cash) with Let's Encrypt TLS via cert-manager HTTP-01
  - www.using.cash permanent-redirect → using.cash
  - app.using.cash placeholder ingress (DNS slot reserved for product app)
- k8s/analytics/: Plausible CE + Postgres 16 + ClickHouse 24.3 with PVCs
  - stats.using.cash ingress with TLS
  - init containers wait for Postgres and ClickHouse before Plausible starts
  - Secrets created out-of-band; placeholder files document the kubectl commands
- Dockerfile: multi-stage Next.js static export → nginx:alpine (port 8080, non-root)
- nginx.conf: trailing-slash static export support, immutable asset caching, security headers
- .gitea/workflows/deploy.yml: CI build→push→rollout on push to main
- docs/deploy.md: first-apply checklist, DNS cutover procedure, rollback commands

Co-Authored-By: Paperclip <noreply@paperclip.ing>
2026-05-20 13:56:07 +00:00

23 lines
852 B
YAML

# Plausible secrets — values must be filled before apply.
# Generate SECRET_KEY_BASE: openssl rand -hex 64
# Generate TOTP_VAULT_KEY: openssl rand -base64 32
#
# Store the actual values in the adapter env vars (never commit real secrets).
# Apply with:
# kubectl create secret generic plausible-env \
# --from-literal=SECRET_KEY_BASE="$(openssl rand -hex 64)" \
# --from-literal=TOTP_VAULT_KEY="$(openssl rand -base64 32)" \
# -n analytics --dry-run=client -o yaml | kubectl apply -f -
#
# This placeholder file is for documentation; the real secret is created
# out-of-band and is not stored in git.
apiVersion: v1
kind: Secret
metadata:
name: plausible-env
namespace: analytics
type: Opaque
stringData:
SECRET_KEY_BASE: REPLACE_WITH_OUTPUT_OF_openssl_rand_hex_64
TOTP_VAULT_KEY: REPLACE_WITH_OUTPUT_OF_openssl_rand_base64_32