2023-12-22 17:57:47 +01:00
|
|
|
FROM python:3.11-alpine3.19
|
2023-10-14 23:46:19 +02:00
|
|
|
|
|
|
|
ENV PORT=8000
|
2023-12-22 17:57:47 +01:00
|
|
|
ENV STATIC_DIR=/public/static
|
|
|
|
EXPOSE 8000
|
2023-10-14 23:46:19 +02:00
|
|
|
|
2023-12-22 18:23:55 +01:00
|
|
|
RUN addgroup --gid 19143 --system ljg && \
|
|
|
|
adduser --disabled-password --home /app --in-group ljg --system --uid 19143 ljg && \
|
2023-12-22 17:57:47 +01:00
|
|
|
mkdir /public && \
|
|
|
|
chown -R 19143:19143 /public
|
2023-10-14 23:46:19 +02:00
|
|
|
|
|
|
|
RUN pip --no-cache-dir install gunicorn
|
|
|
|
|
2023-12-22 17:57:47 +01:00
|
|
|
COPY scripts/entrypoint.sh /
|
|
|
|
COPY LICENSE pyproject.toml /app/
|
|
|
|
COPY ljg/ /app/ljg/
|
2023-10-14 23:46:19 +02:00
|
|
|
|
2023-12-22 17:57:47 +01:00
|
|
|
RUN pip --no-cache-dir install -e '/app[postgres]'
|
2023-10-14 23:46:19 +02:00
|
|
|
|
2023-12-22 17:57:47 +01:00
|
|
|
USER ljg
|
2023-10-14 23:46:19 +02:00
|
|
|
|
|
|
|
ENTRYPOINT ["/entrypoint.sh"]
|