ljg.sh/Dockerfile

22 lines
434 B
Docker
Raw Normal View History

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 17:57:47 +01:00
RUN adduser --disabled-password --home /app --system --uid 19143 ljg && \
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"]