Dockerfile 1.17 KB
Newer Older
1
FROM allgo/base-debian
CAMPION Sebastien's avatar
CAMPION Sebastien committed
2

3 4
# configure stretch backports
COPY setup/backports/. /
CAMPION Sebastien's avatar
CAMPION Sebastien committed
5

BAIRE Anthony's avatar
BAIRE Anthony committed
6
RUN apt-getq update && apt-getq install	\
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 34 35 36
  default-libmysqlclient-dev	\
  default-mysql-client		\
  gcc			\
  gunicorn3		\
  nginx-light		\
  python-mysqldb	\
  python-mysqldb	\
  python3-aiohttp	\
  python3-aioredis	\
  python3-crypto	\
  python3-crypto	\
  python3-dev		\
  python3-django	\
  python3-django-allauth	\
  python3-django-extensions	\
  python3-django-taggit	\
  python3-ipy		\
  python3-iso8601	\
  python3-misaka	\
  python3-mysqldb	\
  python3-natsort	\
  python3-pip		\
  python3-pydotplus	\
  python3-pylint-django	\
  python3-redis		\
  python3-robot-detection	\
  python3-sqlparse	\
  python3-wheel		\
  supervisor		\
  zip
CAMPION Sebastien's avatar
CAMPION Sebastien committed
37

38
COPY requirements.txt /tmp/
39 40
RUN cd /tmp && pip3 install -r requirements.txt && rm requirements.txt

CAMPION Sebastien's avatar
CAMPION Sebastien committed
41
COPY	. /opt/allgo
42
RUN	sh /opt/allgo/setup/setup.sh
CAMPION Sebastien's avatar
CAMPION Sebastien committed
43

44
USER	allgo
CAMPION Sebastien's avatar
CAMPION Sebastien committed
45 46
WORKDIR /opt/allgo
LABEL   dk.migrate_always=1
CAMPION Sebastien's avatar
CAMPION Sebastien committed
47
ENV PYTHONUNBUFFERED 1
48
ENV PYLINTHOME /opt/allgo_metrics
49 50 51 52 53 54

# NOTE: we use SIGINT instead of SIGTERM because the django server does not
# catch SIGTERM (while gunicorn catches both SIGTERM & SIGINT)
STOPSIGNAL SIGINT
CMD ["run-allgo"]

55
HEALTHCHECK CMD healthcheck