File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Build stage
2+ FROM rust:1.91-bookworm AS builder
3+
4+ WORKDIR /build
5+
6+ # Copy workspace files
7+ COPY Cargo.toml Cargo.lock ./
8+ COPY rustfmt.toml ./
9+
10+ # Copy all workspace members
11+ COPY server ./server
12+ COPY api ./api
13+ COPY impls ./impls
14+ COPY auth-impls ./auth-impls
15+
16+ # Build the application in release mode
17+ RUN cargo build --release --bin vss-server
18+
19+ # Runtime stage
20+ FROM debian:bookworm-slim
21+
22+ # Install runtime dependencies
23+ RUN apt-get update && \
24+ apt-get install -y --no-install-recommends \
25+ ca-certificates \
26+ libssl3 \
27+ && rm -rf /var/lib/apt/lists/*
28+
29+ WORKDIR /app
30+
31+ # Copy the compiled binary from builder
32+ COPY --from=builder /build/target/release/vss-server /app/vss-server
33+
34+ # Copy default configuration file
35+ COPY server/vss-server-config.toml /app/vss-server-config.toml
36+
37+ EXPOSE 8080
38+
39+ # Run the server with the config file
40+ CMD ["/app/vss-server" , "/app/vss-server-config.toml" ]
You can’t perform that action at this time.
0 commit comments