Skip to content

Commit

Permalink
fix: start container on Cloud Run at $PORT
Browse files Browse the repository at this point in the history
  • Loading branch information
ngurenyaga committed Jul 12, 2021
1 parent f58a314 commit 7948abc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,4 @@ until postgres_ready; do
done
>&2 echo 'PostgreSQL is available'

exec "$@"
exec "/start"
3 changes: 2 additions & 1 deletion start
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -o nounset


python /app/manage.py collectstatic --noinput
python /app/manage.py migrate
python /app/manage.py createcachetable

compress_enabled() {
Expand All @@ -28,4 +29,4 @@ if compress_enabled; then
python /app/manage.py compress
fi

/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:5000 --chdir=/app -k uvicorn.workers.UvicornWorker
/usr/local/bin/gunicorn config.asgi --bind 0.0.0.0:$PORT --chdir=/app -k uvicorn.workers.UvicornWorker

0 comments on commit 7948abc

Please sign in to comment.