Dockerfile 1.1 KB
Newer Older
CAMPION Sebastien's avatar
CAMPION Sebastien committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
FROM debian:stretch

# install system packages
# Installation of gunicorn through pip because the debian package
# python3-gunicorn doesn't install any binary

# Install Stretch backport
RUN echo "deb http://ftp.debian.org/debian stretch-backports main" \
      >> /etc/apt/sources.list.d/stretch.list

RUN apt-get update && apt-get -t stretch-backports install -y \
      python3-django python3-django-allauth

RUN apt-get install -y  mysql-server default-libmysqlclient-dev \
  nginx-light zip	python3-dev python3-pip python3-mysqldb python-mysqldb \
  supervisor && pip3 install gunicorn


COPY	. /opt/allgo
COPY .env /opt/allgo
COPY init /dk/container_init

RUN patch /etc/nginx/nginx.conf < /opt/allgo/setup/dk/nginx.patch
RUN rm /etc/nginx/sites-enabled/default && \
  rm /etc/supervisor/supervisord.conf && \
  ln -s "/opt/allgo/setup/dk/allgo.conf" /etc/nginx/sites-enabled/allgo && \
  ln -s "/opt/allgo/setup/dk/run-allgo" /usr/local/bin && \
  ln -s "/opt/allgo/setup/dk/supervisord.conf" /etc/supervisor/ && \
  bash /opt/allgo/setup/dk/container_init

WORKDIR /opt/allgo
LABEL   dk.migrate_always=1
CMD run-allgo