Skip to content

Commit

Permalink
fix start script (#456)
Browse files Browse the repository at this point in the history
  • Loading branch information
sainak authored Feb 1, 2024
1 parent 84ce1c6 commit 4cccccc
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions compose/production/django/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,12 @@ postgres_ready() {
python << END
import sys
import psycopg2
import psycopg
try:
psycopg2.connect(
dbname="${POSTGRES_DB}",
user="${POSTGRES_USER}",
password="${POSTGRES_PASSWORD}",
host="${POSTGRES_HOST}",
port="${POSTGRES_PORT}",
)
except psycopg2.OperationalError:
psycopg.connect(conninfo="${DATABASE_URL}")
except psycopg.OperationalError as e:
print(e)
sys.exit(-1)
sys.exit(0)
Expand Down

0 comments on commit 4cccccc

Please sign in to comment.