Skip to content

Commit

Permalink
fix: refer to correct cloud SQL proxy script
Browse files Browse the repository at this point in the history
  • Loading branch information
ngurenyaga committed Jul 12, 2021
1 parent 3d11184 commit 8862adc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -o pipefail
set -o nounset

# run in the background and allow it some time to start before continuing
/cloud_sql_proxy -verbose -structured_logs -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &
/app/cloud_sql_proxy -verbose -structured_logs -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME &
sleep 10
echo "Created Cloud SQL Proxy at $INSTANCE_CONNECTION_NAME, running in the background"

Expand All @@ -16,7 +16,7 @@ fi
echo "Set/checked POSTGRES_USER..."

# omit the port when running on App Engine, Cloud Run etc
if [ -z "${INSTANCE_CONNECTION_NAME}"]; then
if [ -z "${INSTANCE_CONNECTION_NAME}"]]; then
export DATABASE_URL="postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}"
echo "Set up database URL for running in Cloud SQL (Unix Socket)"
else
Expand Down

0 comments on commit 8862adc

Please sign in to comment.