Skip to content
Snippets Groups Projects
Commit dd291e18 authored by Evili del Rio i Silvan's avatar Evili del Rio i Silvan
Browse files

.- Correct entrypoint.sh

.- Add LOG_LEVEL environment variable
.- Use python 3.6 for compatibility
parent ec305129
No related branches found
No related tags found
No related merge requests found
Pipeline #2142 failed
Dockerfile
.dockerignore
README.md
FROM python:alpine
FROM python:3.6-alpine
ARG django_version=1.11
ARG dev_packages="gcc g++ postgresql-dev"
ADD ./entrypoint.sh /
......@@ -15,6 +15,7 @@ RUN apk update && \
pip install "Django<=${DJANGO_VERSION}" gunicorn \
psycopg2-binary psycopg2 mysql-connector \
django-heroku whitenoise[brotli] && \
apk del ${dev_packages}
apk del ${dev_packages} && \
rm -fr /root/.cache
ENTRYPOINT [ "/entrypoint.sh" ]
......@@ -4,6 +4,11 @@ set -x
git clone ${GIT_URL} .
pip install -r requirements.txt --no-input
if [ -z "${WSGI_MODULE}" ]
then
export WSGI_MODULE=$(basename $(dirname $(find . -name wsgi.py | head -1))).wsgi
fi
DJANGO_SETTINGS_MODULE=${DJANGO_SETTINGS_MODULE:-$(basename ${WSGI_MODULE} .wsgi).settings}
# Override static content
......@@ -17,10 +22,5 @@ export DJANGO_SETTINGS_MODULE=settings
python manage.py collectstatic --no-input
python manage.py migrate
if [ -z "${WSGI_MODULE}" ]
then
export WSGI_MODULE=$(basename $(dirname $(find . -name wsgi.py | head -1))).wsgi
fi
gunicorn --log-level=INFO ${WSGI_MODULE} $*
LOG_LEVEL=${LOG_LEVEL:-INFO}
gunicorn --log-level=${LOG_LEVEL} ${WSGI_MODULE} $*
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment