Updated docker build

This commit is contained in:
2026-05-22 14:11:03 +10:00
parent 27d1b03c3c
commit 93c4926dfd
4 changed files with 31 additions and 17 deletions
+14 -11
View File
@@ -1,21 +1,24 @@
FROM alpine:3.14
FROM alpine:latest
RUN apk add --no-cache python3 git ghostscript sqlite
ENV TARGET=/opt/polyphonic
ENV RELEASE=polyphonic-0.8.3-py3-none-any.whl
RUN apk add --no-cache python3 py3-pip git ghostscript sqlite
WORKDIR /root
RUN python3 -m ensurepip
RUN pip3 install -U pip --no-cache-dir
COPY app/requirements.txt .
RUN pip3 install -r requirements.txt --no-cache-dir
RUN python3 -m venv ${TARGET}
ENV PATH="${TARGET}/bin:$PATH"
COPY app /opt/polyphonic
WORKDIR /opt/polyphonic
COPY dist/${RELEASE} .
RUN pip3 install ${RELEASE} --no-cache-dir
COPY docker_settings.py polyphonic/local_settings.py
RUN SECRET_KEY=_ python3 manage.py collectstatic --noinput
WORKDIR ${TARGET}
COPY docker_settings.py local_settings.py
RUN SECRET_KEY=_ ${TARGET}/bin/manage collectstatic --noinput
VOLUME ["/var/polyphonic"]
ENTRYPOINT ["python3", "manage.py"]
ENTRYPOINT ["manage"]
CMD ["runserver", "0.0.0.0:8000", "--insecure"]