Files
infrastructure/portal/Dockerfile
blandClaude Opus 5.5 1bb21d7cbb Portal v0.10.2, and the host's own edits in the repo
compose.yml and portal/Dockerfile on kasse have carried uncommitted
edits since 2026-10-26: the learn cache, Ollama, and SITE_NAME: tomtervel.
A deploy runs git reset --hard, which would take them away. SITE_NAME
would then fall back to "Tomter Vel", the namespace tomter-vel, and from
portal 0.9 the site would come up empty under it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015TMMKWhj4225cSbXKhSz6e
2026-11-01 13:15:04 +01:00

28 lines
1.2 KiB
Docker

# Portal, from the release tarball uhhm/portal publishes on
# project.uhhm.no (the same artifact the bare-metal instances run).
# PORTAL_RELEASE in .env pins the version; bumping it and rebuilding is
# the whole upgrade.
#
# Arch, because that is what the release is built on. The published
# binary is dynamically linked against that runner's glibc, so a
# debian:bookworm-slim base - glibc 2.36 against the 2.38 the binary
# asks for - starts and immediately exits with a version error. The
# base has to be at least as new as the builder, and the builder is
# Arch, so this is Arch. gdo's image is the same base for the same
# reason.
FROM archlinux:base
ARG PORTAL_RELEASE
RUN pacman -Sy --noconfirm --needed ca-certificates curl \
&& pacman -Scc --noconfirm \
&& rm -rf /var/cache/pacman/pkg/* /var/lib/pacman/sync/*
WORKDIR /app
RUN curl -sfL "https://project.uhhm.no/uhhm/portal/releases/download/${PORTAL_RELEASE}/portal-${PORTAL_RELEASE}.tar.gz" \
| tar -xz -C /app \
&& test -x /app/portal
# A non-root user; the image ships nothing writable it needs.
RUN useradd --system --no-create-home portal
RUN mkdir -p /app/learn-cache && chown portal /app/learn-cache
USER portal
EXPOSE 3000
CMD ["/app/portal"]