2026-02-20 00:16:02 +00:00
|
|
|
FROM rust:1 AS builder
|
2026-02-20 00:11:11 +00:00
|
|
|
WORKDIR /usr/src/website
|
|
|
|
|
COPY . .
|
2026-02-20 12:46:05 +00:00
|
|
|
|
|
|
|
|
RUN rustup target add wasm32-unknown-unknown
|
|
|
|
|
RUN cargo install wasm-bindgen-cli
|
|
|
|
|
|
2026-02-20 13:23:22 +00:00
|
|
|
RUN ./build-wasm.sh
|
2026-02-20 12:46:05 +00:00
|
|
|
RUN cargo build --release -p server
|
2026-02-20 00:11:11 +00:00
|
|
|
|
|
|
|
|
FROM debian:trixie-slim
|
2026-02-20 00:16:02 +00:00
|
|
|
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
|
2026-02-20 12:46:05 +00:00
|
|
|
COPY --from=builder /usr/src/website/target/release/server /usr/local/bin/server
|
|
|
|
|
COPY --from=builder /usr/src/website/static /app/static
|
2026-02-20 00:16:02 +00:00
|
|
|
|
2026-02-20 12:46:05 +00:00
|
|
|
WORKDIR /app
|
2026-02-20 00:16:02 +00:00
|
|
|
EXPOSE 3000
|
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=5s --retries=3 \
|
2026-02-20 12:46:05 +00:00
|
|
|
CMD curl -f http://localhost:3000/health || exit 1
|
2026-02-20 00:11:11 +00:00
|
|
|
|
2026-02-20 12:46:05 +00:00
|
|
|
CMD ["server"]
|