diff --git a/Containerfile b/Containerfile index ec5e47c..1faff17 100644 --- a/Containerfile +++ b/Containerfile @@ -10,12 +10,14 @@ ARG DART_SASS_URL=https://github.com/sass/dart-sass/releases/download/${DART_SAS ADD ${DART_SASS_URL} /opt/ RUN cd /opt/ && tar -xzf ${DART_SASS_TAR} && rm ${DART_SASS_TAR} RUN --mount=type=bind,from=source,target=/memoria,source=/,rw \ - cd /memoria/src/memoria/web/www && /opt/dart-sass/sass static/:static/ templates/:templates/ \ - && find . -iname '*.scss' -delete + mkdir -p /tmp/static && mkdir /tmp/templates \ + && cd /memoria/src/memoria/web/www && /opt/dart-sass/sass static/:/tmp/static/ templates/:/tmp/templates/ FROM python:3.12-alpine CMD ["uvicorn", "memoria.web:APP", "--host", "0.0.0.0", "--port", "80"] EXPOSE 80 -RUN --mount=type=bind,from=source,target=/memoria,source=/,rw --mount=type=bind,from=sass,target=/sass,source=/opt/dart-sass,ro --mount=type=cache,target=/cache --mount=type=tmpfs,target=/temp \ - TMPDIR=/temp python -m pip install --cache-dir=/cache /memoria[uvicorn] \ +RUN --mount=type=bind,from=source,target=/memoria,source=/,rw --mount=type=bind,from=sass,target=/sass,source=/tmp,ro --mount=type=cache,target=/cache --mount=type=tmpfs,target=/temp \ + find /memoria -iname '*.scss' -delete \ + && cp -rt /memoria/src/memoria/web/www /sass/* \ + && TMPDIR=/temp python -m pip install --cache-dir=/cache /memoria[uvicorn] \ && mkdir /data