Updated docker build
This commit is contained in:
+14
-11
@@ -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"]
|
||||
|
||||
Reference in New Issue
Block a user