Skip to content

Deploy GCM to Vercel — Ghana Council e.V.#1

Open
Sandydiv3r wants to merge 6 commits into
masterfrom
claude/deploy-to-vercel-UAWUE
Open

Deploy GCM to Vercel — Ghana Council e.V.#1
Sandydiv3r wants to merge 6 commits into
masterfrom
claude/deploy-to-vercel-UAWUE

Conversation

@Sandydiv3r

Copy link
Copy Markdown
Owner

What this does

Adds everything needed to deploy the GCM (Admidio) app to Vercel free plan, configured for Ghana Council e.V. at www.ghanacouncil-nrw.de.

Files added

File Purpose
vercel.json Vercel config — single PHP function, routes, Supabase env vars
api/index.php Front controller — routes all requests to the right Admidio PHP file (free plan = max 1 function)
vercel/build.php Build script — generates adm_my_files/config.php from env vars at deploy time
vercel/.env.example Documents all required environment variables
vercel/README.md Step-by-step deployment instructions
.vercelignore Excludes Dockerfile, CI configs, demo data from the bundle

Database

Uses Supabase (PostgreSQL) — free tier, no credit card required.

Connection defaults pre-set in vercel.json:

  • Port: 5432
  • DB name: postgres
  • User: postgres
  • Only two values to fill in: DB_HOST and DB_PASS from your Supabase project

After merging

  1. Create a free Supabase project → copy Host + Password
  2. Update DB_HOST and DB_PASS in vercel.json
  3. Import repo to Vercel → deploy
  4. Visit /install/index.php to run the Admidio setup wizard
  5. Add www.ghanacouncil-nrw.de in Vercel Domains settings

claude added 5 commits March 24, 2026 01:46
- vercel.json: configures vercel-php@0.7.2 runtime, routes all traffic
  through index.php, and wires DB credentials from Vercel secrets
- scripts/vercel-build.php: build-time script that generates
  adm_my_files/config.php from environment variables with the Ghana
  Council NRW root path (https://www.ghanacouncil-nrw.de) and
  Europe/Berlin timezone pre-configured
- .vercelignore: excludes Dockerfile, CI config, and demo data from
  the deployment bundle

https://claude.ai/code/session_01XovpLEu54vubV3n1FyyGR2
- Move scripts/vercel-build.php → vercel/build.php and fix config path
- Update vercel.json buildCommand to reference vercel/build.php
- Add vercel/README.md with deployment instructions and env var table
- Add vercel/.env.example with all required credentials as placeholders
  (DB_HOST, DB_PORT, DB_NAME, DB_USER, DB_PASS) ready to paste into
  Vercel project settings

https://claude.ai/code/session_01XovpLEu54vubV3n1FyyGR2
Vercel Hobby (free) plan caps deployments at 12 serverless functions.
The previous "**/*.php" wildcard would create one function per PHP file
(100+), immediately exceeding that limit.

Changes:
- vercel.json: replace wildcard functions with a single api/index.php
  function; set maxDuration: 10s (free plan max)
- api/index.php: safe front controller that routes requests to the
  correct Admidio PHP file (root-level or modules/plugins/install/rss)
  with path-traversal protection; falls back to index.php for all
  other paths

https://claude.ai/code/session_01XovpLEu54vubV3n1FyyGR2
Replace Vercel secret references (@db_host etc.) with plain demo values
in vercel.json so the app deploys without any additional setup:
  DB_NAME = gcm_demo
  DB_USER = gcm_demo
  DB_PASS = GcmDemo@2024
  DB_PORT = 3306
  DB_HOST = REPLACE_WITH_DEMO_DB_HOST  ← only value to fill in

Anyone who pulls the repo and connects a Railway/PlanetScale MySQL
database with these credentials gets a working demo instantly.
Production deployments can override all values via Vercel env vars.

https://claude.ai/code/session_01XovpLEu54vubV3n1FyyGR2
- vercel.json: update env to Supabase defaults (port 5432, db=postgres,
  user=postgres); host and password are placeholders to fill in once
- vercel/build.php: change gDbType from mysql to pgsql
- vercel/.env.example: document Supabase connection fields

https://claude.ai/code/session_01XovpLEu54vubV3n1FyyGR2
@vercel

vercel Bot commented Mar 24, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
gcm Error Error Mar 24, 2026 2:20am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants