Something went wrong. Try again.
Self-hosted Tangled spindle
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849FROM nixos/nix:2.35.4 AS build
ENV NIX_CONFIG="experimental-features = nix-command flakes"SHELL ["/bin/sh", "-e", "-c"]
# Rosetta cannot load Nix's x86 seccomp filter inside the Docker build sandbox.RUN printf '%s\n' 'filter-syscalls = false' >> /etc/nix/nix.conf
RUN source='git+https://tangled.org/tangled.org/core?ref=refs/tags/v1.20.0' \ && mkdir -p /runtime/usr/local/bin /runtime/nix/store \ && if nix build --out-link /tmp/spindle "$source#pkgsStatic-spindle"; then \ cp -L /tmp/spindle/bin/spindle /runtime/usr/local/bin/spindle; \ echo 'mill: using pkgsStatic-spindle'; \ else \ echo 'mill: static build failed; building spindle with its runtime closure' >&2; \ nix build --out-link /tmp/spindle "$source#spindle"; \ nix-store -qR "$(readlink -f /tmp/spindle)" > /tmp/closure; \ while IFS= read -r path; do \ cp -a "$path" /runtime/nix/store/; \ done < /tmp/closure; \ ln -s "$(readlink -f /tmp/spindle)/bin/spindle" /runtime/usr/local/bin/spindle; \ fi
# Tangled requires Git >= 2.49; trixie's Git 2.47 is too old.FROM debian:forky-slim@sha256:04db4720574d184e24353e77e46dbbe4377edad01c9ba50a67aa1473cef9b9d4
# Use the suite's current security updates rather than freezing apt versions.# hadolint ignore=DL3008RUN apt-get update \ && apt-get install -y --no-install-recommends git ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && groupadd --gid 10001 spindle \ && useradd --uid 10001 --gid spindle --home-dir /data --no-create-home spindle \ && install -d -o spindle -g spindle -m 0700 /run/spindle \ && install -d -o spindle -g spindle /data
COPY --from=build /runtime/ /COPY --chmod=755 mill/entrypoint.sh /usr/local/bin/mill-entrypoint
ENV SPINDLE_ROLE=mill \ SPINDLE_SERVER_DB_PATH=/data/spindle.db \ SPINDLE_SERVER_REPO_DIR=/data/repos \ SPINDLE_SERVER_LOG_DIR=/data/logs \ SPINDLE_SERVER_HYDRANT_DIR=/data/hydrant
WORKDIR /dataEXPOSE 6555ENTRYPOINT ["/usr/local/bin/mill-entrypoint"]