diff options
| -rw-r--r-- | README | 29 | ||||
| -rw-r--r-- | README.rst | 16 |
2 files changed, 37 insertions, 8 deletions
@@ -59,7 +59,10 @@ docker run -d \ postgres:15.1 Then, copy .env.example to .env and fill in the required environment variables -that suit your setup. +that suit your setup. For the Docker command above, DATABASE_URL should look +like this: + +postgresql://admin:YOUR_PASSWORD_HERE@localhost:5432/db Generate authentication key: This project uses Better Auth. A secure key of at least 32 characters must be provided. @@ -75,11 +78,25 @@ Run installation of react-syntax-highlighter dependencies: pnpm add react-syntax-highlighter pnpm add -D @types/react-syntax-highlighter -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) +Create the Payload PostgreSQL schema before running Payload migrations: +pnpm tsx scripts/create-payload-schema.mts + +Run Payload CMS migrations: +pnpm payload:migrate + +Run database migrations: +pnpm db:push + +If OAuth environment variables are not configured locally, skip validation for +database push and development startup: +SKIP_ENV_VALIDATION=1 pnpm db:push + +Start the development server: +pnpm dev + +Or, with local env validation skipped: +SKIP_ENV_VALIDATION=1 pnpm dev + Open <http://localhost:3000> Core Modules @@ -70,13 +70,25 @@ Run the following command to start a Postgres instance: Then copy ``.env.example`` to ``.env`` and fill in the required environment variables for your setup. +For the Docker command above, ``DATABASE_URL`` should look like this: + +.. code-block:: bash + + postgresql://admin:YOUR_PASSWORD_HERE@localhost:5432/db + .. code-block:: bash pnpm install - pnpm payload migrate + pnpm tsx scripts/create-payload-schema.mts + pnpm payload:migrate pnpm db:push -Optional: +The ``scripts/create-payload-schema.mts`` step creates the PostgreSQL +``payload`` schema required by ``payload.config.ts`` before Payload migrations +create tables inside it. + +If OAuth environment variables are not configured locally, skip validation for +database push and development startup: .. code-block:: bash |
