diff --git a/reactive_home/Dockerfile b/reactive_home/Dockerfile index bb69234..4b16848 100644 --- a/reactive_home/Dockerfile +++ b/reactive_home/Dockerfile @@ -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" ] \ No newline at end of file diff --git a/reactive_home/config.yaml b/reactive_home/config.yaml index 5658ad3..a0fffe7 100644 --- a/reactive_home/config.yaml +++ b/reactive_home/config.yaml @@ -9,8 +9,3 @@ arch: homeassistant_api: true map: - config:rw -devices: - - /dev/fuse -apparmor: unconfined -privileged: - - SYS_ADMIN diff --git a/reactive_home/get-version.ts b/reactive_home/get-version.ts deleted file mode 100644 index a093448..0000000 --- a/reactive_home/get-version.ts +++ /dev/null @@ -1,11 +0,0 @@ -const versionRegex = /version: "(.+?)"/gim; - -const configYaml = await Deno.readTextFile("/config.yaml"); - -const result = versionRegex.exec(configYaml); - -const version = result?.at?.(1); - -if (version) { - console.log(version); -} diff --git a/reactive_home/run.sh b/reactive_home/run.sh index 6f847cb..ecabf5a 100644 --- a/reactive_home/run.sh +++ b/reactive_home/run.sh @@ -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 \ No newline at end of file +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 \ No newline at end of file