Commit Graph

6 Commits

Author SHA1 Message Date
Matt 439d70c7e4 Fix invite flow, dashboard 500, and RLS policy errors
Build and Push Docker Images / build-portal (push) Successful in 1m49s Details
Build and Push Docker Images / build-infra (docker/db, monacousa-db) (push) Successful in 1m4s Details
Build and Push Docker Images / build-infra (docker/kong, monacousa-kong) (push) Successful in 24s Details
Build and Push Docker Images / build-infra (docker/migrate, monacousa-migrate) (push) Successful in 1m3s Details
- Fix auth verify handler to read token_hash (GoTrue param name) instead
  of token, and verify OTP server-side before redirecting
- Fix reset-password page to handle both token_hash and pre-existing
  session from verify handler
- Fix intermittent dashboard 500 by adding error handling and retry to
  members_with_dues query in safeGetSession
- Fix RLS policies using members.user_id (nonexistent) → members.id for
  cron_execution_logs and bulk_emails tables

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 19:13:44 +01:00
Matt f9364d2176 Add migrations 018-025 to post-deploy.sql for automatic deployment
Build and Push Docker Images / build-portal (push) Successful in 3m5s Details
Build and Push Docker Images / build-infra (docker/db, monacousa-db) (push) Successful in 1m3s Details
Build and Push Docker Images / build-infra (docker/kong, monacousa-kong) (push) Successful in 22s Details
Build and Push Docker Images / build-infra (docker/migrate, monacousa-migrate) (push) Successful in 1m1s Details
All new migrations are now embedded in post-deploy.sql (idempotent),
so they run automatically on `docker compose up` via the migrate container.
Both deploy/ and docker/migrate/ copies are kept in sync.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 18:11:02 +01:00
Matt fa99cda157 Fix Kong permission denied error in entrypoint
Build and Push Docker Images / build-portal (push) Successful in 2m9s Details
Build and Push Docker Images / build-infra (docker/db, monacousa-db) (push) Successful in 1m8s Details
Build and Push Docker Images / build-infra (docker/kong, monacousa-kong) (push) Successful in 25s Details
Build and Push Docker Images / build-infra (docker/migrate, monacousa-migrate) (push) Successful in 1m10s Details
- Add chown to give kong user write permissions to /var/lib/kong
- Fixes 'can't create /var/lib/kong/kong.yml: Permission denied' error
- Allows entrypoint script to generate kong.yml from template

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 14:05:13 +01:00
Matt 87ff2d5d20 Fix Kong CORS configuration for cross-origin requests
Build and Push Docker Images / build-portal (push) Successful in 2m26s Details
Build and Push Docker Images / build-infra (docker/db, monacousa-db) (push) Successful in 1m16s Details
Build and Push Docker Images / build-infra (docker/kong, monacousa-kong) (push) Successful in 26s Details
Build and Push Docker Images / build-infra (docker/migrate, monacousa-migrate) (push) Has been cancelled Details
- Add proper CORS configuration to all Kong routes
- Allow portal.monacousa.org and localhost origins
- Configure allowed methods, headers, and credentials
- Fixes 'Cross-site POST form submissions are forbidden' error

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-10 13:50:36 +01:00
Matt 3a72b0a184 Add CI builds for all custom images and fix Kong Dockerfile
Build and Push Docker Images / build-portal (push) Successful in 2m32s Details
Build and Push Docker Images / build-infra (docker/db, monacousa-db) (push) Successful in 1m30s Details
Build and Push Docker Images / build-infra (docker/kong, monacousa-kong) (push) Successful in 34s Details
Build and Push Docker Images / build-infra (docker/migrate, monacousa-migrate) (push) Successful in 1m13s Details
- Gitea Actions now builds monacousa-db, monacousa-kong, and
  monacousa-migrate alongside the portal image on every push to main
- Fix Kong Dockerfile permission issue (use COPY --chmod instead of RUN chmod)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 10:56:55 +01:00
Matt 2ed04cd9f7 Redesign deployment: only .env + docker-compose.yml needed on server
Build and Push Docker Image / build (push) Successful in 2m17s Details
Custom Docker images embed all config so production servers no longer
need SQL files, kong.yml, or shell scripts. Kong generates config from
env vars at startup. Migrate container auto-detects fresh vs existing
DB and runs appropriate scripts.

New images: monacousa-db, monacousa-kong, monacousa-migrate
New commands: deploy.sh build-images, deploy.sh push-images

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-06 10:33:25 +01:00