We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc62670 commit 7b331bdCopy full SHA for 7b331bd
tests/postgres_conf.py
@@ -1,13 +1,16 @@
1
+import os
2
+
3
from piccolo.engine.postgres import PostgresEngine
4
from piccolo.conf.apps import AppRegistry
5
6
7
DB = PostgresEngine(
- {
- "host": "localhost",
8
- "database": "piccolo",
9
- "user": "piccolo",
10
- "password": "piccolo",
+ config={
+ "host": os.environ.get("PG_HOST", "localhost"),
+ "port": os.environ.get("PG_PORT", "5432"),
11
+ "user": os.environ.get("PG_USER", "postgres"),
12
+ "password": os.environ.get("PG_PASSWORD", ""),
13
+ "database": os.environ.get("PG_DATABASE", "piccolo"),
14
}
15
)
16
0 commit comments