Skip to content

Commit

Permalink
Revert "feat: use mergerfs to create shared cache between image and h…
Browse files Browse the repository at this point in the history
…ost"

This reverts commit fe15fde.
  • Loading branch information
TheNoim committed Apr 27, 2024
1 parent 25c47e3 commit 1917559
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 43 deletions.
14 changes: 1 addition & 13 deletions reactive_home/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,15 @@ FROM denoland/deno:bin-$DENO_VERSION AS deno

FROM $BUILD_FROM

ENV DEBIAN_FRONTEND=noninteractive

COPY --from=deno /deno /usr/local/bin/deno

RUN apt update && \
apt install mergerfs -yq && \
rm -rf /var/lib/apt/lists/*

COPY run.sh /
COPY deno.lock /
COPY run.ts /
COPY loader.ts /
COPY config.yaml /
COPY update-import-map.ts /
COPY get-version.ts /

ENV DENO_DIR=/deno_image_cache

RUN chmod a+x /run.sh && \
mkdir /deno_image_cache && \
deno cache "https://deno.land/x/reactivehome@$(deno run --allow-all /get-version.ts)/mod.ts" && \
deno cache /loader.ts
RUN chmod a+x /run.sh

CMD [ "/run.sh" ]
5 changes: 0 additions & 5 deletions reactive_home/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,3 @@ arch:
homeassistant_api: true
map:
- config:rw
devices:
- /dev/fuse
apparmor: unconfined
privileged:
- SYS_ADMIN
11 changes: 0 additions & 11 deletions reactive_home/get-version.ts

This file was deleted.

16 changes: 2 additions & 14 deletions reactive_home/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,5 @@ if [[ ! -f /config/reactive-home/import_map.json ]]; then
}" >> /config/reactive-home/import_map.json
fi

mkdir -p /config/reactive-home/deno_cache/npm
mkdir -p /config/reactive-home/deno_cache/deps
mkdir -p /config/reactive-home/deno_cache/gen

mkdir -p /deno_cache/npm
mkdir -p /deno_cache/deps
mkdir -p /deno_cache/gen

mergerfs /deno_image_cache/npm=RO:/config/reactive-home/deno_cache/npm /deno_cache/npm
mergerfs /deno_image_cache/deps=RO:/config/reactive-home/deno_cache/deps /deno_cache/deps
mergerfs /deno_image_cache/gen=RO:/config/reactive-home/deno_cache/gen /deno_cache/gen

DENO_DIR=/deno_cache deno run --lock=/deno.lock --allow-read=/config/reactive-home/import_map.json,/config.yaml --allow-write=/config/reactive-home/import_map.json /update-import-map.ts
DENO_DIR=/deno_cache deno run --lock=/deno.lock --allow-env --allow-net --allow-run --allow-sys --allow-read /run.ts --root /config/reactive-home
deno run --lock=/deno.lock --allow-read=/config/reactive-home/import_map.json,/config.yaml --allow-write=/config/reactive-home/import_map.json /update-import-map.ts
deno run --lock=/deno.lock --allow-env --allow-net --allow-run --allow-sys --allow-read /run.ts --root /config/reactive-home

0 comments on commit 1917559

Please sign in to comment.