Skip to content

Instantly share code, notes, and snippets.

@padupe
Created November 16, 2022 19:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save padupe/b89c8905f37e5e528b55a3b3af5fdd10 to your computer and use it in GitHub Desktop.
Save padupe/b89c8905f37e5e528b55a3b3af5fdd10 to your computer and use it in GitHub Desktop.
[Backstage] Getting Started with PostgreSQL on a Backstage Instance
# app-config.yaml
[...]

backend:
  database:
-    client: better-sqlite3
-    connection: ':memory:'
+    # config options: https://node-postgres.com/api/client
+    client: pg
+    connection:
+      host: ${POSTGRES_HOST}
+      port: ${POSTGRES_PORT}
+      user: ${POSTGRES_USER}
+      password: ${POSTGRES_PASSWORD}
+    knexConfig:
+      pool:
+        min: 3
+        max: 12
+        acquireTimeoutMillis: 60000
+        idleTimeoutMillis: 60000

[...]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment