Set up Pages CMS for local development
mainTo run Pages CMS locally, you need PostgreSQL, a GitHub App, a local .env.local file, and the repository checked out. Follow these steps:
Clone the repository:
git clone https://github.com/pagescms/pagescms.git cd pagescmsStart PostgreSQL locally using Docker:
docker run --name pagescms-db -e POSTGRES_USER=pagescms -e POSTGRES_PASSWORD=pagescms -e POSTGRES_DB=pagescms -p 5432:5432 -d postgres:16Install dependencies:
npm installConfigure environment variables by creating a
.env.localfile.Create a GitHub App using the setup helper:
npm run setup:github-app -- --base-url http://localhost:3000Run database migrations:
npm run db:migrateStart the application:
npm run dev
git clone https://github.com/pagescms/pagescms.git
cd pagescms
docker run --name pagescms-db -e POSTGRES_USER=pagescms -e POSTGRES_PASSWORD=pagescms -e POSTGRES_DB=pagescms -p 5432:5432 -d postgres:16
npm install
npm run setup:github-app -- --base-url http://localhost:3000
npm run db:migrate
npm run dev