Docker Deploy
Build a minimal production image for a Resuma Flow app.
Dockerfile
This repo (resuma-docs) is standalone: Dockerfile, fly.toml, and .dockerignore live at the repo root. Deploy from this directory — not a symlink/junction on Windows (remote builders cannot read through them).
The image builds the TypeScript client, compiles the website binary, and runs as non-root on Debian slim.
FROM node:22-bookworm AS client
WORKDIR /app
COPY package.json package-lock.json tsconfig.json ./
COPY client ./client
RUN npm ci 2>/dev/null || npm install
RUN npm run build:client
FROM rust:1-bookworm AS builder
WORKDIR /app
COPY Cargo.toml rust-toolchain.toml ./
COPY src ./src
COPY --from=client /app/static/client ./static/client
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/* \
&& useradd --system --uid 10001 --create-home resuma
WORKDIR /app
COPY --from=builder /app/target/release/website /app/website
COPY --from=builder /app/src/pages /app/pages
RUN chown -R resuma:resuma /app
USER resuma
ENV HOST=0.0.0.0 PORT=3000 RESUMA_PAGES_ROOT=/app/pages
ENV RESUMA_ENV=production RESUMA_TRUST_PROXY=1
EXPOSE 3000
CMD ["/app/website"]Build and run locally
docker build -t resuma-docs .
docker run -p 3000:3000 -e HOST=0.0.0.0 -e PORT=3000 resuma-docsFly.io
A fly.toml is included at the repo root (same pattern as other apps in your Fly org).
# First time (creates app resuma-docs in iad)
fly launch --no-deploy
# Deploy
fly deploy
# Open in browser
fly openBind address
Flow reads RESUMA_ADDR or HOST + PORT. Fly sets HOST=0.0.0.0 and PORT=3000 in fly.toml.
Notes
- Node.js is only in the build stage (Resuma Client bundles); the runtime image is Rust + pages only.
- Resuma runtime JS is embedded in the
resumacrate — no extra Node step for apps without client components. - Set
RESUMA_ENV=productionandRESUMA_TRUST_PROXY=1— see Configure security. - Health check hits
/(seefly.toml); Flow also serves/robots.txtand/sitemap.xml.