diff --git a/README.md b/README.md index 3186885..ed1e09a 100644 --- a/README.md +++ b/README.md @@ -94,7 +94,7 @@ Let's go through these lines one-by-one: 6. *Optional:* If you need to run any build-time tasks, such as collecting static assets, now's the time to do that. 7. We set the container command (`CMD`) to a list of arguments that will be passed to `gunicorn`. We need to provide Gunicorn with the [`APP_MODULE`](http://docs.gunicorn.org/en/stable/run.html?highlight=app_module#gunicorn), so that it knows which WSGI app to run.* -> Note that previously the way to do point 5 was to set the `APP_MODULE` environment variable. That still works, but is no longer the recommended way and is deprecated. +> Note that previously the way to do point 5 was to set the `APP_MODULE` environment variable. This functionality has been removed. By default, the [`django-entrypoint.sh`](django-entrypoint.sh) script is run when the container is started. This script runs a once-off `django-admin migrate` to update the database schemas and then launches `nginx` and `gunicorn` to run the application. diff --git a/django-entrypoint.sh b/django-entrypoint.sh index 8953ae6..839ebb2 100755 --- a/django-entrypoint.sh +++ b/django-entrypoint.sh @@ -1,9 +1,8 @@ #!/usr/bin/env sh set -e -# No args or looks like options or the APP_MODULE for Gunicorn -if [ "$#" = 0 ] || \ - [ "${1#-}" != "$1" ] || \ +# Looks like options or the APP_MODULE for Gunicorn +if [ "${1#-}" != "$1" ] || \ echo "$1" | grep -Eq '^([_A-Za-z]\w*\.)*[_A-Za-z]\w*:[_A-Za-z]\w*$'; then set -- gunicorn "$@" fi @@ -57,12 +56,6 @@ if not User.objects.filter(username='admin').exists(): celery-entrypoint.sh beat --pidfile beat.pid & fi - if [ -n "$APP_MODULE" ]; then - echo 'DEPRECATED: Providing APP_MODULE via an environment variable is deprecated. - Please provide it using the container command rather.' 1>&2 - set -- "$@" "$APP_MODULE" - fi - # Set some sensible Gunicorn options, needed for things to work with Nginx # umask working files (worker tmp files & unix socket) as 0o117 (i.e. chmod as