2020-04-29 05:08:19 +02:00
|
|
|
FROM python:3-alpine as requirements
|
2020-02-01 13:52:49 +01:00
|
|
|
|
2020-04-29 05:08:19 +02:00
|
|
|
WORKDIR /usr/src/app/
|
|
|
|
|
|
|
|
RUN pip install --no-cache-dir pipenv
|
2020-02-01 13:52:49 +01:00
|
|
|
|
2020-04-29 05:08:19 +02:00
|
|
|
COPY Pipfile .
|
|
|
|
COPY Pipfile.lock .
|
2020-02-01 13:52:49 +01:00
|
|
|
|
2020-04-29 05:08:19 +02:00
|
|
|
RUN pipenv lock -r > requirements.txt
|
2020-02-01 13:52:49 +01:00
|
|
|
|
2019-03-27 20:30:59 +01:00
|
|
|
FROM debian:testing-slim
|
|
|
|
|
|
|
|
RUN apt-get update \
|
|
|
|
&& apt-get -y install \
|
|
|
|
fonts-roboto \
|
|
|
|
inkscape \
|
2020-04-29 17:27:06 +02:00
|
|
|
mupdf-tools \
|
2019-03-27 20:30:59 +01:00
|
|
|
openscad \
|
|
|
|
python3 \
|
|
|
|
python3-pip \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
|
|
|
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
2020-04-29 05:08:19 +02:00
|
|
|
COPY --from=requirements /usr/src/app/requirements.txt .
|
2019-03-27 20:30:59 +01:00
|
|
|
|
2020-04-29 05:08:19 +02:00
|
|
|
RUN pip3 install --no-cache-dir -r requirements.txt \
|
|
|
|
&& pyppeteer-install
|
2019-03-27 20:30:59 +01:00
|
|
|
|
|
|
|
RUN mkdir static
|
|
|
|
COPY . .
|
|
|
|
|
2020-04-29 05:08:19 +02:00
|
|
|
ENTRYPOINT ["hypercorn", "-w", "4", "-b", "0.0.0.0:8000", "server:app"]
|
2020-02-01 13:52:49 +01:00
|
|
|
|
|
|
|
EXPOSE 8000
|