add mime type, fixes static files not loading when using reverse proxy

This commit is contained in:
FuzzyGrim
2023-03-09 21:35:27 +01:00
parent 9ca004a087
commit fe4e3bdde8

View File

@@ -3,7 +3,7 @@ FROM python:3.9-slim as builder
COPY ./requirements.txt /requirements.txt
RUN apt-get update && apt-get install -y --no-install-recommends g++ gosu && \
RUN apt-get update && apt-get install -y --no-install-recommends g++ && \
pip install --extra-index-url https://www.piwheels.org/simple --target=/dependencies -r /requirements.txt
@@ -14,7 +14,14 @@ ENV PYTHONUNBUFFERED=1
COPY --from=builder /dependencies /usr/local
ENV PYTHONPATH=/usr/local
COPY --from=builder /usr/sbin/gosu /usr/sbin/gosu
RUN apt-get update && apt-get install -y --no-install-recommends \
# step down from root on entrypoint
gosu \
# add mime types for static files
mime-support && \
apt-get clean && rm -rf /var/lib/apt/lists/* && apt-get autoremove
WORKDIR /app