|
@ -24,17 +24,22 @@ COPY . /doccano |
|
|
RUN cd /doccano \ |
|
|
RUN cd /doccano \ |
|
|
&& tools/ci.sh |
|
|
&& tools/ci.sh |
|
|
|
|
|
|
|
|
|
|
|
FROM builder AS cleaner |
|
|
|
|
|
|
|
|
RUN cd /doccano \ |
|
|
RUN cd /doccano \ |
|
|
&& python app/manage.py collectstatic --noinput |
|
|
&& python app/manage.py collectstatic --noinput |
|
|
|
|
|
|
|
|
RUN rm -rf /doccano/app/server/node_modules/ |
|
|
|
|
|
|
|
|
RUN rm -rf /doccano/app/server/node_modules/ \ |
|
|
|
|
|
&& rm -rf /doccano/app/server/static/ \ |
|
|
|
|
|
&& rm -rf /doccano/app/staticfiles/js/ \ |
|
|
|
|
|
&& find /doccano/app/staticfiles -type f -name '*.map*' -delete |
|
|
|
|
|
|
|
|
FROM python:${PYTHON_VERSION}-slim AS runtime |
|
|
FROM python:${PYTHON_VERSION}-slim AS runtime |
|
|
|
|
|
|
|
|
COPY --from=builder /deps /deps |
|
|
COPY --from=builder /deps /deps |
|
|
RUN pip install --no-cache-dir /deps/*.whl |
|
|
RUN pip install --no-cache-dir /deps/*.whl |
|
|
|
|
|
|
|
|
COPY --from=builder /doccano /doccano |
|
|
|
|
|
|
|
|
COPY --from=cleaner /doccano /doccano |
|
|
|
|
|
|
|
|
ENV DEBUG="True" |
|
|
ENV DEBUG="True" |
|
|
ENV SECRET_KEY="change-me-in-production" |
|
|
ENV SECRET_KEY="change-me-in-production" |
|
|