Portal 1.0 keeps everything in one file (portal_data) and has no NATS. gdo and kron dial it over dhd/1 from loopback, so the three share one network namespace, held by a container of its own: held by portal, a restart of portal cut the other two off. NATS stays behind a profile nothing turns on, for going back; the chat (cnats) is out. The deploy writes DHD_KEYS and the hash of LOAD_TOKEN, and no NATS or chat settings. gdo is built from uhhm/gdo at GDO_RELEASE, since the gdo that dials a site is not in the registry. move.sh reads the programs' keys and prints what the deploy wants. Run on kasse beside the live stack, on other ports, with made-up records: mail out, a payment settled, content loaded over /dhd/1/load, and both programs back after portal was restarted and made anew. Co-Authored-By: Claude <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5fbDjTQg4CJsNqEo7hhE7
33 lines
1.5 KiB
Docker
33 lines
1.5 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
|
|
# -Syu, never -Sy: a partial upgrade pulls a library newer than what the
|
|
# base image's own pacman was built against (openssl 4, November 2026) and
|
|
# refuses to install.
|
|
RUN pacman -Syu --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. What it writes is in two volumes: the search cache,
|
|
# and /data, where the site's store is (PORTAL_STORE in compose.yml); a
|
|
# new volume takes this directory's owner.
|
|
RUN useradd --system --no-create-home portal
|
|
RUN mkdir -p /app/learn-cache /data && chown portal /app/learn-cache /data
|
|
USER portal
|
|
EXPOSE 3000
|
|
CMD ["/app/portal"]
|