Files
rhema-together/Dockerfile
T
vhaudiquet b5babb682e build: depend on the Rhema crates by version
The manifest pointed at `../rhema`, so a build needed that checkout
beside the repository. CI cloned it in two jobs and the Dockerfile
cloned a tag and rewrote the paths. The committed lock had drifted to
0.5.1 entries after the framework bumped to 0.5.2, so the first cargo
command in a clean tree rewrote it.

All twelve crates are on crates.io at 0.5.2, so the manifest names that
version and the lock pins it. The clone steps, the `RHEMA_REF`
argument, and the path rewrite are gone from the workflows and the
image. Moving the framework now means `cargo update` on the `rhema-*`
packages.
2026-11-30 22:42:01 +01:00

43 lines
1.5 KiB
Docker

# syntax=docker/dockerfile:1
# The client is static; Nuxt generate leaves .output/public.
FROM node:22-bookworm-slim AS web
WORKDIR /app/web
RUN npm install --global pnpm@11.22.0
COPY web/package.json web/pnpm-lock.yaml web/pnpm-workspace.yaml ./
RUN pnpm install --frozen-lockfile
COPY web/ ./
RUN pnpm build
# The server depends on the Rhema crates by version. Cargo.lock pins
# them, so an image does not move when the framework's main branch does.
FROM rust:1.98.1-bookworm AS server
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates cmake pkg-config \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /app
COPY Cargo.toml Cargo.lock ./
COPY src ./src
RUN cargo build --release
FROM debian:bookworm-slim
RUN apt-get update \
&& apt-get install -y --no-install-recommends ca-certificates \
&& rm -rf /var/lib/apt/lists/* \
&& groupadd --gid 10001 together \
&& useradd --uid 10001 --gid 10001 --home-dir /data --shell /usr/sbin/nologin --no-create-home together \
&& install -d -o together -g together /data
WORKDIR /app
COPY --from=server /app/target/release/rhema-together /app/rhema-together
COPY --from=web /app/web/.output/public /app/web
ENV TOGETHER_LISTEN=0.0.0.0:7800 \
TOGETHER_DATABASE=/data/together.db \
TOGETHER_SECRET_KEY_FILE=/data/secret.key \
TOGETHER_WEB_DIR=/app/web \
HOME=/data \
RUST_LOG=rhema_together=info,tower_http=warn
USER 10001:10001
VOLUME ["/data"]
EXPOSE 7800
ENTRYPOINT ["/app/rhema-together"]