Next.js App Router site with Decap CMS content editing.
nvm use
pnpm installpnpm dev:allAdmin 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 cmsTo 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:allWhen 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.
This project is configured to use Decap CMS with the GitHub backend against:
digitalgroundgame/take-back-america-tourLocal 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/callbackSet these runtime environment variables:
DECAP_CMS_GITHUB_CLIENT_ID
DECAP_CMS_GITHUB_CLIENT_SECRET
DECAP_GITHUB_SCOPE=public_repo,userOnly GitHub users with write access to the repository should use the admin UI.
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-tourThe 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.