summaryrefslogtreecommitdiff
path: root/README
diff options
context:
space:
mode:
authorBertrand Yuan <me@bertyuan.com>2025-12-31 16:43:47 +0800
committerBertrand Yuan <me@bertyuan.com>2025-12-31 16:43:47 +0800
commit828c8eb046096691675838d530d8b49db4d58425 (patch)
tree8a2fb7b12a3ac778216fe6f77ee40a65b256fe63 /README
parent3d25fb9ab9a0565aac3d4362cdbe7a61b5ece2f0 (diff)
docs: add instructions in readme
Diffstat (limited to 'README')
-rw-r--r--README24
1 files changed, 17 insertions, 7 deletions
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 <admin@example.com> / 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 <http://localhost:3000>
Core Modules
------------