Skip to content

About

Next.js and DecapCMS site for the Take Back America Tour

Resources

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Take Back America Tour

Next.js App Router site with Decap CMS content editing.

Setup

nvm use
pnpm install

Development

pnpm dev:all

Admin UI: http://127.0.0.1:4000/admin

Homepage: http://localhost:4000

pnpm dev:all starts both the Next.js dev server and the Decap CMS local proxy server. To run them separately:

pnpm dev
pnpm cms

To serve the development app from another hostname on your network, set DEV_HOSTNAME before starting the app:

DEV_HOSTNAME=your-dev-host.example pnpm dev:all

When using /admin from a network hostname, keep pnpm dev:all running so the Decap local backend proxy is available on the same hostname at port 8081. The DEV_HOSTNAME value also configures the proxy CORS origin as http://your-dev-host.example:4000. Stop any existing dev servers before changing DEV_HOSTNAME so the Decap proxy restarts with the new CORS origin.

Decap CMS GitHub Auth

This project is configured to use Decap CMS with the GitHub backend against:

digitalgroundgame/take-back-america-tour

Local development uses Decap's local proxy backend. Start both local servers with pnpm dev:all, then visit /admin.

Production uses GitHub OAuth. Create a GitHub OAuth App with this callback URL:

https://your-domain.com/api/cms/callback

Set these runtime environment variables:

DECAP_CMS_GITHUB_CLIENT_ID
DECAP_CMS_GITHUB_CLIENT_SECRET
DECAP_GITHUB_SCOPE=public_repo,user

Only GitHub users with write access to the repository should use the admin UI.

Docker Deployment

Build and run the production image:

docker build --tag take-back-america-tour .
docker run --rm --publish 4000:4000 \
  --env-file .env.local \
  take-back-america-tour

The image exposes port 4000, listens on all interfaces, and includes a health check at /api/health.

The Coolify production application uses the Dockerfile build pack with /Dockerfile, port 4000, and the /api/health health check.

Set DECAP_CMS_GITHUB_CLIENT_ID and DECAP_CMS_GITHUB_CLIENT_SECRET in the runtime environment. The admin UI uses GitHub OAuth on configured production hosts and the local proxy on other development hostnames.

About

Next.js and DecapCMS site for the Take Back America Tour

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages