Dockerfile 1012 Bytes
Newer Older
1
FROM allgo/base-debian
CAMPION Sebastien's avatar
CAMPION Sebastien committed
2 3 4 5 6

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

7 8
# configure stretch backports
COPY setup/backports/. /
CAMPION Sebastien's avatar
CAMPION Sebastien committed
9

10
RUN apt-getq update && apt-getq install mysql-server default-libmysqlclient-dev \
11
  python3-django python3-django-allauth \
12 13 14
  nginx-light zip gcc python3-dev python3-pip python3-wheel python3-mysqldb	\
  python-mysqldb supervisor\
  && pip3 install gunicorn
CAMPION Sebastien's avatar
CAMPION Sebastien committed
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31


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