polyphonic/Dockerfile

24 lines
474 B
Docker

FROM alpine:latest
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 venv ${TARGET}
ENV PATH="${TARGET}/bin:$PATH"
COPY dist/${RELEASE} .
RUN pip3 install ${RELEASE} --no-cache-dir
WORKDIR ${TARGET}
RUN SECRET_KEY=_ poly-tool collectstatic --noinput
VOLUME ["/var/polyphonic"]
ENTRYPOINT ["poly-tool"]
CMD ["runserver", "0.0.0.0:8000", "--insecure"]