diff --git a/.gitignore b/.gitignore index c68f9b83..61969b08 100644 --- a/.gitignore +++ b/.gitignore @@ -334,4 +334,5 @@ pepfar_mle/media/ !.envs/.local/ secrets/* +cloud_sql_proxy diff --git a/entrypoint b/entrypoint index e5a8a327..616655f6 100644 --- a/entrypoint +++ b/entrypoint @@ -8,9 +8,10 @@ set -o nounset if [ -z "${CLOUD_SQL_PROXY_VERSION}" ]; then export CLOUD_SQL_PROXY_VERSION=v1.23.0 # see https://github.com/GoogleCloudPlatform/cloudsql-proxy/releases fi -wget "https://storage.googleapis.com/cloudsql-proxy/$VERSION/cloud_sql_proxy.linux.amd64" -O cloud_sql_proxy +wget "https://storage.googleapis.com/cloudsql-proxy/$CLOUD_SQL_PROXY_VERSION/cloud_sql_proxy.linux.amd64" -O cloud_sql_proxy chmod +x cloud_sql_proxy -cloud_sql_proxy -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME & # run in the background! +cloud_sql_proxy -verbose -structured_logs -dir=/cloudsql -instances=$INSTANCE_CONNECTION_NAME & # run in the background! +sleep 10 # allow time for the proxy to start echo "Created Cloud SQL Proxy at $INSTANCE_CONNECTION_NAME, running in the background" if [ -z "${POSTGRES_USER}" ]; then