2021-11-08 23:18:23 +01:00
|
|
|
FROM debian:11
|
2021-04-01 09:48:35 +02:00
|
|
|
|
2021-07-02 13:43:18 +02:00
|
|
|
# Prevents Python from writing pyc files to disc (equivalent to python -B option)
|
|
|
|
ENV PYTHONDONTWRITEBYTECODE 1
|
|
|
|
# Prevents Python from buffering stdout and stderr (equivalent to python -u option)
|
|
|
|
ENV PYTHONUNBUFFERED 1
|
2021-04-01 09:48:35 +02:00
|
|
|
|
|
|
|
# set work directory
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2021-04-28 16:43:39 +02:00
|
|
|
# set time
|
|
|
|
RUN ln -fs /usr/share/zoneinfo/Europe/Madrid /etc/localtime
|
|
|
|
RUN dpkg-reconfigure -f noninteractive tzdata
|
|
|
|
|
2021-04-01 09:48:35 +02:00
|
|
|
# install software
|
|
|
|
RUN apt update
|
2021-10-21 22:41:19 +02:00
|
|
|
RUN apt install -y build-essential python3-dev libpq-dev python3-pip gettext
|
2021-10-21 14:48:29 +02:00
|
|
|
|
2021-04-01 09:48:35 +02:00
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
RUN pip3 install --upgrade pip
|
2022-07-29 10:59:09 +02:00
|
|
|
# install basic dependencies
|
2021-04-01 09:48:35 +02:00
|
|
|
COPY ./requirements.txt .
|
|
|
|
RUN pip3 install -r requirements.txt
|
|
|
|
|
|
|
|
# launcher
|
2022-06-27 14:28:40 +02:00
|
|
|
COPY django-launcher.sh /django-launcher.sh
|
|
|
|
RUN chmod +x /django-launcher.sh
|