feat: add one-command Traefik deployment
This commit is contained in:
34
Containerfile.release
Normal file
34
Containerfile.release
Normal file
@@ -0,0 +1,34 @@
|
||||
ARG NGINX_IMAGE=nginxinc/nginx-unprivileged:1.31.3-alpine@sha256:18d67281256ded39ff65e010ae4f831be18f19356f83c60bc546492c7eb6dd23
|
||||
|
||||
FROM ${NGINX_IMAGE} AS release
|
||||
|
||||
ARG TOOLBOX_RELEASE_VERSION=0.2.0
|
||||
ARG TOOLBOX_RELEASE_SHA256=60b37de7f26ae430737cb014a86e8b9b15e9eafe0a6883d6a28d06d9611ee237
|
||||
ARG TOOLBOX_RELEASE_BASE_URL=https://git.add-ideas.de/zemion/toolbox-portal/releases/download
|
||||
|
||||
RUN set -eu; \
|
||||
archive="add-ideas-toolbox-${TOOLBOX_RELEASE_VERSION}.zip"; \
|
||||
curl --fail --location --silent --show-error --proto '=https' \
|
||||
--proto-redir '=https' --tlsv1.2 \
|
||||
--output "/tmp/${archive}" \
|
||||
"${TOOLBOX_RELEASE_BASE_URL}/v${TOOLBOX_RELEASE_VERSION}/${archive}"; \
|
||||
echo "${TOOLBOX_RELEASE_SHA256} /tmp/${archive}" | sha256sum -c -; \
|
||||
mkdir -p /tmp/toolbox; \
|
||||
unzip -q "/tmp/${archive}" -d /tmp/toolbox; \
|
||||
test -f /tmp/toolbox/index.html; \
|
||||
test -f /tmp/toolbox/toolbox.catalog.json; \
|
||||
test -f /tmp/toolbox/toolbox.release.json; \
|
||||
test -f /tmp/toolbox/apps/pdf/toolbox-app.json; \
|
||||
test -f /tmp/toolbox/apps/xslt/toolbox-app.json; \
|
||||
test -f /tmp/toolbox/apps/onenote/toolbox-app.json; \
|
||||
rm "/tmp/${archive}"
|
||||
|
||||
FROM ${NGINX_IMAGE}
|
||||
|
||||
COPY --chown=101:101 deploy/nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=release --chown=101:101 /tmp/toolbox/ /usr/share/nginx/html/
|
||||
|
||||
USER 101:101
|
||||
EXPOSE 8080
|
||||
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
|
||||
CMD wget --quiet --spider http://127.0.0.1:8080/toolbox.catalog.json || exit 1
|
||||
Reference in New Issue
Block a user