Dockerfile 1.04 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 7
RUN apt-getq update && apt-getq install	\
  default-mysql-client default-libmysqlclient-dev	\
8
  python3-django python3-django-allauth python3-misaka \
9
  nginx-light zip gcc python3-dev python3-pip python3-wheel python3-mysqldb	\
10
  python-mysqldb python3-crypto gunicorn3 python3-redis python-mysqldb \
11
  python3-crypto python3-natsort python3-aiohttp python3-aioredis supervisor	\
12
  python3-ipy python3-django-taggit python3-iso8601 python3-robot-detection	\
LETORT Sebastien's avatar
LETORT Sebastien committed
13
  python3-sqlparse python3-pydotplus
CAMPION Sebastien's avatar
CAMPION Sebastien committed
14

LETORT Sebastien's avatar
LETORT Sebastien committed
15 16
# COPY requirements.txt /tmp/
COPY requirements_dev.txt /tmp/requirements.txt
17 18
RUN cd /tmp && pip3 install -r requirements.txt && rm requirements.txt

CAMPION Sebastien's avatar
CAMPION Sebastien committed
19
COPY	. /opt/allgo
20
RUN	sh /opt/allgo/setup/setup.sh
CAMPION Sebastien's avatar
CAMPION Sebastien committed
21

22
USER	allgo
CAMPION Sebastien's avatar
CAMPION Sebastien committed
23 24
WORKDIR /opt/allgo
LABEL   dk.migrate_always=1
CAMPION Sebastien's avatar
CAMPION Sebastien committed
25
ENV PYTHONUNBUFFERED 1
26 27 28 29 30 31

# 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"]

32
HEALTHCHECK CMD healthcheck