# Slim runtime image for kez-chat-server, used by the "deploy fast" path. # # This Dockerfile expects two prebuilt artifacts in the build context: # # ./prebuilt/kez-chat-server — the Rust binary, linux/amd64 # ./prebuilt/web/ — the Svelte SPA dist directory # # Both are produced LOCALLY by `deploy-fast.local.sh` via # `docker buildx build --target=export` on the developer's fast # machine, then rsynced to the remote. The remote build does no Rust # or npm work — it just stitches together a tiny runtime image, which # takes <5 seconds instead of the 8–12 minutes a full Rust rebuild # takes on the (slower) production box. # # Build context = kez-chat/deploy/ (the directory holding this file # and the prebuilt/ subdirectory). Pinned by docker-compose.fast.yml. FROM debian:bookworm-slim RUN apt-get update && apt-get install -y --no-install-recommends \ ca-certificates \ && rm -rf /var/lib/apt/lists/* \ && useradd -r -u 10001 -m kez # Rust binary — must already be built for linux/amd64. COPY prebuilt/kez-chat-server /usr/local/bin/kez-chat-server RUN chmod +x /usr/local/bin/kez-chat-server # SPA static files. COPY prebuilt/web/ /app/web/ USER kez WORKDIR /data ENV KEZ_CHAT_BIND=0.0.0.0:6969 \ KEZ_CHAT_DB=/data/kez-chat.db \ KEZ_CHAT_SERVER=kez.lat \ KEZ_CHAT_SIG_SERVER_URL=http://sig-server:7878 \ KEZ_CHAT_WEB_DIR=/app/web \ RUST_LOG=info EXPOSE 6969 ENTRYPOINT ["/usr/local/bin/kez-chat-server"]