File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,14 @@ def get_sys_exec_root_or_drive():
28
28
if not postgres_db :
29
29
raise KeyError ("Application requires 'POSTGRES_DB' to run" )
30
30
31
+ postgres_host = os .environ .get ('POSTGRES_HOST' )
32
+ if not postgres_host :
33
+ raise KeyError ("Application requires 'POSTGRES_HOST' to run" )
34
+
31
35
32
36
class Config :
33
37
SQLALCHEMY_TRACK_MODIFICATIONS = False
34
- SQLALCHEMY_DATABASE_URI = f"postgresql://{ postgres_user } :{ postgres_password } @{ postgres_db } :5432/{ postgres_db } "
38
+ SQLALCHEMY_DATABASE_URI = f"postgresql://{ postgres_user } :{ postgres_password } @{ postgres_host } :5432/{ postgres_db } "
35
39
36
40
# Can pass in changes to defaults, such as PaginatorConfig(per_page=40)
37
41
RESOURCE_PAGINATOR = PaginatorConfig ()
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ services:
23
23
- POSTGRES_USER=${POSTGRES_USER}
24
24
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
25
25
- POSTGRES_DB=${POSTGRES_DB}
26
+ - POSTGRES_HOST=${POSTGRES_HOST}
26
27
ports :
27
28
- 5432:5432
28
29
volumes :
You can’t perform that action at this time.
0 commit comments