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

3 4 5 6 7 8 9 10
# 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 \
BERJON Matthieu's avatar
BERJON Matthieu committed
11
  nginx-light zip	python3-dev python3-pip python3-mysqldb \
12
  supervisor && pip3 install gunicorn
13

14 15

COPY	. /opt/allgo
16
COPY .env /opt/allgo
BERJON Matthieu's avatar
BERJON Matthieu committed
17
COPY init /dk/container_init
18 19 20 21 22 23 24 25

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
26 27 28

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