RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
apk add -U darkhttpd
-RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
-RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
-
-USER ${USER}
-
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
+USER ${USER}
EXPOSE ${PORT}
+VOLUME [ "/www/config.yml", "/www/assets" ]
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
apk add -U darkhttpd && \
rm /usr/bin/qemu-arm-static
-RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
-RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
-
-USER ${USER}
-
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
+USER ${USER}
EXPOSE ${PORT}
+VOLUME [ "/www/config.yml", "/www/assets" ]
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
apk add -U darkhttpd && \
rm /usr/bin/qemu-aarch64-static
-RUN echo "darkhttpd /www/ --no-listing --port $PORT" > /entrypoint.sh
-RUN set -ex chown ${USER}:${GROUP} /entrypoint.sh
-
-USER ${USER}
-
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
+COPY --chown=${USER}:${GROUP} entrypoint.sh /entrypoint.sh
+USER ${USER}
EXPOSE ${PORT}
+VOLUME [ "/www/config.yml", "/www/assets" ]
ENTRYPOINT ["/bin/sh", "/entrypoint.sh"]
--- /dev/null
+#!/bin/sh
+
+yes n | cp -i /www/config.yml.dist /www/config.yml
+while true; do echo n; done | cp -Ri /app/dist/www/assets /www/assets 2>/dev/null
+
+darkhttpd /www/ --no-listing --port $PORT