forked from extern/homer
Replaced darkhttpd with lighttpd
This commit is contained in:
parent
caf5fae8a8
commit
b6b31e440c
@ -12,18 +12,19 @@ RUN yarn build
|
||||
# production stage
|
||||
FROM alpine:3.15
|
||||
|
||||
ENV USER darkhttpd
|
||||
ENV GROUP darkhttpd
|
||||
ENV USER lighttpd
|
||||
ENV GROUP lighttpd
|
||||
ENV GID 911
|
||||
ENV UID 911
|
||||
ENV PORT 8080
|
||||
|
||||
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
|
||||
apk add -U --no-cache su-exec darkhttpd
|
||||
apk add -U --no-cache lighttpd
|
||||
|
||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
COPY lighttpd.conf /lighttpd.conf
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
|
||||
|
@ -21,19 +21,20 @@ FROM arm32v7/alpine:3.11
|
||||
|
||||
COPY --from=qemu qemu-arm-static /usr/bin/
|
||||
|
||||
ENV USER darkhttpd
|
||||
ENV GROUP darkhttpd
|
||||
ENV USER lighttpd
|
||||
ENV GROUP lighttpd
|
||||
ENV GID 911
|
||||
ENV UID 911
|
||||
ENV PORT 8080
|
||||
|
||||
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
|
||||
apk add -U --no-cache darkhttpd su-exec && \
|
||||
apk add -U --no-cache lighttpd && \
|
||||
rm /usr/bin/qemu-arm-static
|
||||
|
||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
COPY lighttpd.conf /lighttpd.conf
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
|
||||
|
@ -21,19 +21,20 @@ FROM arm64v8/alpine:3.11
|
||||
|
||||
COPY --from=qemu qemu-aarch64-static /usr/bin/
|
||||
|
||||
ENV USER darkhttpd
|
||||
ENV GROUP darkhttpd
|
||||
ENV USER lighttpd
|
||||
ENV GROUP lighttpd
|
||||
ENV GID 911
|
||||
ENV UID 911
|
||||
ENV PORT 8080
|
||||
|
||||
RUN addgroup -S ${GROUP} -g ${GID} && adduser -D -S -u ${UID} ${USER} ${GROUP} && \
|
||||
apk add -U --no-cache darkhttpd su-exec && \
|
||||
apk add -U --no-cache lighttpd && \
|
||||
rm /usr/bin/qemu-aarch64-static
|
||||
|
||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist /www/
|
||||
COPY --from=build-stage --chown=${USER}:${GROUP} /app/dist/assets /www/default-assets
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
COPY lighttpd.conf /lighttpd.conf
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=5s --retries=3 \
|
||||
CMD wget --no-verbose --tries=1 --spider http://127.0.0.1:${PORT}/ || exit 1
|
||||
|
@ -18,4 +18,6 @@ if [[ -n "${SUBFOLDER}" ]]; then
|
||||
fi
|
||||
|
||||
chown -R $UID:$GID /www/assets
|
||||
exec su-exec $UID:$GID darkhttpd /www/ --no-listing --port "$PORT"
|
||||
|
||||
echo "Starting webserver"
|
||||
lighttpd -D -f /lighttpd.conf
|
||||
|
20
lighttpd.conf
Normal file
20
lighttpd.conf
Normal file
@ -0,0 +1,20 @@
|
||||
# Minimal config by Kirmy34
|
||||
|
||||
include "/etc/lighttpd/mime-types.conf"
|
||||
|
||||
server.port = 8080
|
||||
|
||||
server.username = "lighttpd"
|
||||
server.groupname = "lighttpd"
|
||||
|
||||
server.document-root = "/www"
|
||||
server.pid-file = "/run/lighttpd.pid"
|
||||
|
||||
server.indexfiles = ("index.php", "index.html", "index.htm", "default.htm")
|
||||
|
||||
server.follow-symlink = "enable"
|
||||
|
||||
static-file.exclude-extensions = (".php", ".pl", ".cgi", ".fcgi")
|
||||
|
||||
url.access-deny = ("~", ".inc")
|
||||
|
Loading…
Reference in New Issue
Block a user