Dockerfile 922 Bytes
Newer Older
BERJON Matthieu's avatar
BERJON Matthieu committed
1
FROM debian:stretch
2

3
# install system packages
4 5
# Installation of gunicorn through pip because the debian package
# python3-gunicorn doesn't install any binary
BERJON Matthieu's avatar
BERJON Matthieu committed
6 7 8 9
RUN apt-get update && apt-get install -y \
  mysql-server default-libmysqlclient-dev \
	nginx-light zip	\
  python3 python3-dev python3-pip python3-django python3-mysqldb python-mysqldb \
10 11
  python3-django-environ supervisor && pip3 install gunicorn

12 13

COPY	. /opt/allgo
BERJON Matthieu's avatar
BERJON Matthieu committed
14
COPY init /dk/container_init
15 16 17 18 19 20 21 22

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
23 24 25

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