update docker-compose to add healthcheck
This commit is contained in:
@@ -40,6 +40,13 @@ if "API_KEY" in ENV:
|
||||
else:
|
||||
logger.error("API_KEY not found in .env file... cannot continue.")
|
||||
exit()
|
||||
try:
|
||||
with psycopg.connect(connect_statement) as conn:
|
||||
with conn.cursor() as cur:
|
||||
cur.execute("SELECT 1")
|
||||
except Exception as error:
|
||||
logger.error("Failed to connect to PostgreSQL: {}", error)
|
||||
exit()
|
||||
|
||||
with psycopg.connect(connect_statement) as conn:
|
||||
with conn.cursor() as cur:
|
||||
|
||||
Reference in New Issue
Block a user