Deploy on Vercel
Deploy Pages CMS on Vercel with PostgreSQL and a GitHub App.
What you need
- a PostgreSQL database,
- a Vercel project,
- a GitHub App,
- a copy of the Pages CMS repo.
Recommended order
- Create the database.
- Deploy the app to Vercel.
- Set environment variables.
- Create or update the GitHub App with the final Vercel URL.
- Run migrations.
- Install the GitHub App on the repositories you want to manage.
Deploy the app
Deploy your fork or copy of the repo in Vercel.
After the first deploy, note the final app URL, for example:
https://cms.example.com
Set environment variables
Set at least:
DATABASE_URLCRYPTO_KEYBETTER_AUTH_SECRETBASE_URL
Then add the GitHub App variables.
For the full list, see Environment variables.
Configure the GitHub App
Prefer the helper if you can. If you configure the app manually, use:
- User authorization callback URL:
<BASE_URL>/api/auth/callback/github - Webhook URL:
<BASE_URL>/api/webhook/github - Setup URL:
<BASE_URL>/
Minimum repository permissions:
- Administration: Read and write
- Contents: Read and write
- Metadata: Read only
Minimum events:
- Installation target
- Repository
- Push
- Delete
Also keep:
- OAuth on install: disabled
- Redirect on update: enabled
Run migrations
npm run db:migrate