28 lines
806 B
Docker
28 lines
806 B
Docker
FROM python:3.13-slim-bullseye
|
|
|
|
WORKDIR /app
|
|
|
|
RUN set -ex \
|
|
&& apt-get update \
|
|
&& apt-get install -y gettext gcc locales tzdata libpq-dev \
|
|
&& localedef -i fr_FR -c -f UTF-8 -A /usr/share/locale/locale.alias fr_FR.UTF-8 \
|
|
&& ln -fs /usr/share/zoneinfo/Europe/Paris /etc/localtime \
|
|
&& dpkg-reconfigure --frontend noninteractive tzdata \
|
|
&& pip install -U pip uwsgi \
|
|
&& apt-get install -y age openssh-client \
|
|
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
|
|
|
COPY ./requirements.txt .
|
|
RUN pip install --no-cache -r requirements.txt
|
|
|
|
COPY . .
|
|
|
|
RUN chgrp -R 0 /app && \
|
|
chmod -R g+rwX /app && \
|
|
chmod +x docker-prestart.sh
|
|
|
|
ENTRYPOINT ["sh", "/app/docker-prestart.sh"]
|
|
|
|
CMD ["gunicorn", "--bind", "0.0.0.0:8002", "--workers", "3", "api.wsgi:application"]
|
|
|
|
EXPOSE 8002 |