diff --git a/docs/source/guides/state.rst b/docs/source/guides/state.rst index 7cc6b20a..df794005 100644 --- a/docs/source/guides/state.rst +++ b/docs/source/guides/state.rst @@ -138,17 +138,10 @@ Run the SQL schema to create the required table: Configuration ^^^^^^^^^^^^^ -Once the database table is created, configure Plano to use PostgreSQL storage: +Once the database table is created, configure Plano to use PostgreSQL storage. -.. code-block:: yaml - - state_storage: - type: postgres - connection_string: "postgresql://user:password@host:5432/database" - -**Using Environment Variables** - -You should **never** hardcode credentials. Use environment variables instead: +.. important:: + **Never** hardcode credentials. Always use environment variables in your connection string. .. code-block:: yaml diff --git a/docs/source/resources/db_setup/README.md b/docs/source/resources/db_setup/README.md index 34aff973..987a431d 100644 --- a/docs/source/resources/db_setup/README.md +++ b/docs/source/resources/db_setup/README.md @@ -64,8 +64,9 @@ After setting up the database table, configure your application to use Supabase **Example:** ```bash -# If your password is "MyPass#123", encode it as "MyPass%23123" -export DATABASE_URL="postgresql://postgres.myproject:MyPass%23123@aws-0-us-west-2.pooler.supabase.com:5432/postgres" +# If your password is "MyPass#123", URL-encode special characters (# becomes %23) +export DB_PASSWORD="MyPass%23123" +export DATABASE_URL="postgresql://postgres.myproject:${DB_PASSWORD}@aws-0-us-west-2.pooler.supabase.com:5432/postgres" ``` ### Testing the Connection