From 828c8eb046096691675838d530d8b49db4d58425 Mon Sep 17 00:00:00 2001 From: Bertrand Yuan Date: Wed, 31 Dec 2025 16:43:47 +0800 Subject: docs: add instructions in readme --- README | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) (limited to 'README') diff --git a/README b/README index 2e81737..f21f4ed 100644 --- a/README +++ b/README @@ -34,13 +34,23 @@ Email: Resend with React Email, welcome template styled by Tailwind. Quickstart ---------- -1. Install toolchain. Node 20+ recommended. Use pnpm locked by pnpm-lock.yaml. -2. Set environment variables. Copy .env.example to .env and fill DATABASE_URL, PAYLOAD_SECRET, BETTER_AUTH_SECRET, and OAuth keys if needed. -3. Start Postgres locally. Run ./start-database.sh (Docker/Podman) or connect to your own Postgres instance. -4. Install dependencies and build schema. Run pnpm install; pnpm db:generate && pnpm db:migrate for Drizzle; pnpm payload:migrate for Payload CMS. -5. Run the dev server. pnpm dev (defaults to port 3000; Payload Admin at /admin, blog at /). -6. Optional extras. pnpm payload:generate for types; pnpm email:dev -p 3001 to preview the email template. -Payload in development pre-fills / admin123 on the login form. +I recommend using docker to run postgres. +Run the following command to start a Postgres instance: +docker run -d \ + --name Next-blog \ + -e POSTGRES_USER=admin \ + -e POSTGRES_PASSWORD=YOUR_PASSWORD_HERE \ + -e POSTGRES_DB=db \ + -p 5432:5432 \ + -v "$(pwd)/pgdata:/var/lib/postgresql/data" \ + postgres:15.1 + +Then, copy .env.example to .env and fill in the required environment variables that suit your setup. +Run: pnpm install +Run Payload CMS migrations: pnpm payload migrate +Run database migrations: pnpm db:push (optional: SKIP_ENV_VALIDATION=1 pnpm db:push) +Start the development server: pnpm dev (optional SKIP_ENV_VALIDATION=1 pnpm dev) +Open Core Modules ------------ -- cgit v1.2.3