Update db-creation.py
continuous-integration/drone/push Build is failing Details

main
Félix MIELCAREK 12 months ago committed by GitHub
parent 570aca9fb7
commit b9bcdc9f0d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,8 +1,16 @@
import psycopg2
import os
env_dbname = os.getenv('POSTGRES_DATABASE')
env_user = os.getenv('POSTGRES_USER')
env_password = os.getenv('POSTGRES_PASSWORD')
print(env_dbname)
print(env_user)
print(env_password)
# Establish connection to the PostgreSQL database
conn = psycopg2.connect(dbname=os.getenv('POSTGRES_DATABASE'), user=os.getenv('POSTGRES_USER'), password=os.getenv('POSTGRES_PASSWORD'), host="felixmielcarek-bigbrotherdb")
conn = psycopg2.connect(dbname=env_dbname, user=env_user, password=env_password, host="felixmielcarek-bigbrotherdb")
# Create a cursor object to execute SQL queries
cur = conn.cursor()

Loading…
Cancel
Save