File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -26,6 +26,7 @@ services:
2626 - " 127.0.0.1:5000:8080"
2727 environment :
2828 - SCM_DB_HOST=postgres
29+ - SCM_DB_PORT=5432
2930 - SCM_DB_PASSWORD_FILE=/run/secrets/db_password
3031 - SCM_BASE_URL=https://compliance.sovereignit.cloud/
3132 volumes :
Original file line number Diff line number Diff line change 6262class Settings :
6363 def __init__ (self ):
6464 self .db_host = os .getenv ("SCM_DB_HOST" , "localhost" )
65+ self .db_port = os .getenv ("SCM_DB_PORT" , 5432 )
6566 self .db_user = os .getenv ("SCM_DB_USER" , "postgres" )
6667 password_file_path = os .getenv ("SCM_DB_PASSWORD_FILE" , None )
6768 if password_file_path :
@@ -144,7 +145,8 @@ def default(self, obj):
144145
145146
146147def mk_conn (settings = settings ):
147- return psycopg2 .connect (host = settings .db_host , user = settings .db_user , password = settings .db_password )
148+ return psycopg2 .connect (host = settings .db_host , user = settings .db_user ,
149+ password = settings .db_password , port = settings .db_port )
148150
149151
150152def get_conn (settings = settings ):
You can’t perform that action at this time.
0 commit comments