Skip to content

Commit

Permalink
Hopefully fix SASS build under github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidneys1 committed Jun 5, 2024
1 parent 61e99f8 commit 8988af7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8988af7

Please sign in to comment.