This repository has been archived on 2020-11-22. You can view files and clone it, but cannot push or open issues or pull requests.
mangareader/Dockerfile

48 lines
905 B
Docker
Raw Normal View History

FROM node:alpine as frontend
2019-07-04 18:06:44 +02:00
WORKDIR /usr/src/app/frontend/
COPY frontend .
RUN yarn install \
&& yarn build
FROM python:3-alpine as requirements
WORKDIR /usr/src/app/
2019-08-07 20:15:56 +02:00
RUN apk add --no-cache git \
&& pip install --no-cache-dir pipenv
2019-07-04 18:06:44 +02:00
COPY Pipfile .
COPY Pipfile.lock .
RUN pipenv lock -r > requirements.txt
FROM python:3-alpine
WORKDIR /usr/src/app
COPY --from=requirements /usr/src/app/requirements.txt .
RUN apk add --no-cache --virtual .deps \
build-base \
libjpeg-turbo-dev \
libwebp-dev \
2019-07-04 18:06:44 +02:00
zlib-dev \
&& pip install -r requirements.txt \
&& apk del .deps \
&& apk add --no-cache \
libjpeg-turbo \
libwebp
2019-07-04 18:06:44 +02:00
COPY --from=frontend /usr/src/app/frontend/dist/ frontend/dist
2019-08-07 22:35:22 +02:00
COPY *.py ./
VOLUME ["/usr/src/app/cache/"]
2019-07-04 18:06:44 +02:00
ENTRYPOINT ["gunicorn", "mangareader:app", "--bind", "0.0.0.0:8000", "--chdir", "/library"]
EXPOSE 8000