]> git.immae.eu Git - github/bastienwirtz/homer.git/commitdiff
Apply suggestions from code review avoid-file-volume
authorBastien Wirtz <bastien.wirtz@gmail.com>
Fri, 26 Jun 2020 04:13:22 +0000 (21:13 -0700)
committerGitHub <noreply@github.com>
Fri, 26 Jun 2020 04:13:22 +0000 (21:13 -0700)
Co-authored-by: Glenn Toms <Glenn@Glenntoms.gg>
Dockerfile
Dockerfile.arm32v7
Dockerfile.arm64v8
entrypoint.sh

index c760fecb4417b6e6a3f29fd0f7c173b18f6cbf94..ef734bbfd89a4e4d174b4f894eaf1634513cc554 100644 (file)
@@ -23,7 +23,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
 
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
 COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
-RUN mv /www/assets /www/default-assets
+COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
 
 USER ${USER}
 EXPOSE ${PORT}
index 8dc3b1c04675e3790e9be3615980c0c2d9ee9a3b..69230e8127c946d3d5d7069f71e52607304d3cf7 100644 (file)
@@ -33,7 +33,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
 
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
 COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
-RUN mv /www/assets /www/default-assets
+COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
 
 USER ${USER}
 EXPOSE ${PORT}
index 8a7e99f952bf02ae9b2905abafe6b12db7743e82..91c2ba2eb619d34c7b73f6241be0e707b6ebba99 100644 (file)
@@ -33,7 +33,7 @@ RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} &
 
 COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
 COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
-RUN mv /www/assets /www/default-assets
+COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
 
 USER ${USER}
 EXPOSE ${PORT}
index 0b7cd24ee0f788b524231a6c6bbc0b1f3012d360..6b96f94fd55a3202166c902f2e4b8dea654851e5 100644 (file)
@@ -1,7 +1,8 @@
 #!/bin/sh
 
 while true; do echo n; done | cp -Ri /www/default-assets/* /www/assets/
-
+# This makes sure that at least the default config is available.
+yes n | cp -i /www/assets/config.yml.dist /www/assets/config.yml
 # Ensure compatibility with previous version (config.yml was in the root directory)
 if [ -f "/www/config.yml" ]; then
     yes n | cp -i /www/config.yml /www/assets