diff --git a/Dockerfile b/Dockerfile index 8c20100..365b87a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,32 @@ -FROM python:3 AS builder +FROM python:3.10-bullseye AS deps WORKDIR /usr/src/app -COPY . . -# install python stuff -RUN python -m pip install --upgrade pip +RUN python -m pip install --upgrade pip==22.2.2 +RUN apt-get update -qq && apt-get install -qq nodejs npm + +COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt -# build assets -RUN apt-get update -qq && apt-get install -qq nodejs npm +COPY package.json package-lock.json ./ RUN npm install --save-dev + + +FROM scratch AS layer-cake +WORKDIR / + +COPY *.py setup.cfg rollup.config.js ./ +COPY assets assets +COPY components components +COPY libforget libforget +COPY migrations migrations +COPY routes routes +COPY static static +COPY templates templates + + +FROM deps + +COPY --from=layer-cake / ./ RUN doit VOLUME ["/var/run/celery"]