summaryrefslogtreecommitdiff
path: root/README.rst
diff options
context:
space:
mode:
authorBertrand Yuan <github@bertyuan.com>2026-04-27 23:47:07 +0800
committerBertrand Yuan <github@bertyuan.com>2026-04-27 23:47:07 +0800
commit66b79706e886432ffa7c134ec39a87f43c43f3c1 (patch)
treee56ff06f03f308062fc58fec1a4aae73bd7298f7 /README.rst
parent4b6b62a97f6d7765f80bd2f92d919a7d1522a36f (diff)
docs: update README with Docker DATABASE_URL exampleHEADmaster
Added an example for the DATABASE_URL configuration in the Docker section of the README. Included instructions for creating the PostgreSQL schema before running migrations to ensure proper setup for the application. Signed-off-by: Bertrand Yuan <github@bertyuan.com>
Diffstat (limited to 'README.rst')
-rw-r--r--README.rst16
1 files changed, 14 insertions, 2 deletions
diff --git a/README.rst b/README.rst
index b1d35aa..2feab19 100644
--- a/README.rst
+++ b/README.rst
@@ -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