-
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (36 loc) · 1.42 KB
/
Copy pathDockerfile
File metadata and controls
49 lines (36 loc) · 1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
# ============================================================================
# Prism Server - Dockerfile for Google Cloud Run
# ============================================================================
# Multi-stage build for minimal image size
# ============================================================================
# Stage 1: Build the Rust binary
FROM rust:1.85-bookworm AS builder
WORKDIR /app
# Copy source code
COPY . .
# Build release binary
RUN cargo build --release --bin prism-server
# ============================================================================
# Stage 2: Create minimal runtime image
# ============================================================================
FROM debian:bookworm-slim
# Install minimal runtime dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends ca-certificates && \
rm -rf /var/lib/apt/lists/*
# Copy binary from builder
COPY --from=builder /app/target/release/prism-server /usr/local/bin/
# Copy web viewer files
COPY --from=builder /app/web-viewer /web-viewer
# Set working directory (web-viewer is served relative to this)
WORKDIR /
# Expose port
EXPOSE 8080
# Configure for Cloud Run (bind to 0.0.0.0)
ENV PRISM_HOST=0.0.0.0
ENV PRISM_PORT=8080
# Health check for Cloud Run
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:8080/api/health || exit 1
# Run the server
CMD ["prism-server"]