- server.js uses pg (pinned 8.23.1), reads DATABASE_URL, creates the leads table on start, fails fast if Postgres is unreachable - tests run against a real Postgres in a throwaway schema - CI runs the test image against a throwaway Postgres on DinD - k8s: Postgres 18 StatefulSet (Longhorn, 2Gi), init container wait, password secret, network policy app-to-postgres; app no longer needs a volume or Recreate - README: DBeaver via port-forward, CSV export via docs/export-leads.sql Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EFUzfmHGGiYUjNcvJoyzdf
13 lines
470 B
YAML
13 lines
470 B
YAML
# EXAMPLE ONLY - never commit real values. Create the real Secret on the cluster:
|
|
# microk8s kubectl -n ins-landing-page create secret generic ins-landing-page-db \
|
|
# --from-literal=POSTGRES_PASSWORD="$(openssl rand -hex 24)"
|
|
# The password is embedded in a postgres:// URL, so use URL-safe characters (hex is).
|
|
apiVersion: v1
|
|
kind: Secret
|
|
metadata:
|
|
name: ins-landing-page-db
|
|
namespace: ins-landing-page
|
|
type: Opaque
|
|
stringData:
|
|
POSTGRES_PASSWORD: change-me
|