Browse Source

Enable Heroku to pass $PORT to Docker

pull/80/head
Clemens Wolff 6 years ago
parent
commit
e038aa8f7a
2 changed files with 3 additions and 3 deletions
  1. 4
      Dockerfile
  2. 2
      tools/run.sh

4
Dockerfile

@ -22,9 +22,9 @@ WORKDIR /doccano
ENV DEBUG="True"
ENV SECRET_KEY="change-me-in-production"
ENV BIND="0.0.0.0:80"
ENV PORT="80"
ENV WORKERS="2"
EXPOSE 80
EXPOSE ${PORT}
CMD ["/doccano/tools/run.sh"]

2
tools/run.sh

@ -6,4 +6,4 @@ if [[ ! -d "app/staticfiles" ]]; then python app/manage.py collectstatic --noinp
python app/manage.py wait_for_db
python app/manage.py migrate
gunicorn --bind="${BIND:-127.0.0.1:8000}" --workers="${WORKERS:-1}" --pythonpath=app app.wsgi
gunicorn --bind="0.0.0.0:${PORT:-8000}" --workers="${WORKERS:-1}" --pythonpath=app app.wsgi
Loading…
Cancel
Save