Skip to content

Commit 2c421e7

Browse files
committed
Auto-commit: Sync changes [2026-03-05]
1 parent 0799d98 commit 2c421e7

5 files changed

Lines changed: 27 additions & 79 deletions

File tree

examples/web-project-deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"test": "deno test --allow-all"
99
},
1010
"imports": {
11-
"rescript": "npm:rescript@^12.1.0",
11+
"rescript": "^12.0.0",
1212
"@rescript/core": "npm:@rescript/core@^1.6.0",
1313
"safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/",
1414
"proven/": "../proven/bindings/rescript/src/"

justfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,3 +136,8 @@ test-all: test test-rust
136136
# Generate API client from protobuf
137137
proto-gen:
138138
cd src/rust-routing && cargo build
139+
140+
# [AUTO-GENERATED] Multi-arch / RISC-V target
141+
build-riscv:
142+
@echo "Building for RISC-V..."
143+
cross build --target riscv64gc-unknown-linux-gnu

src/rust-routing/Containerfile

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,57 @@
1-
# VEDS Route Optimizer - Dockerfile
1+
# SPDX-License-Identifier: MIT OR AGPL-3.0
2+
# VEDS Route Optimizer - Distroless Container
23
# Multi-stage build for minimal production image
34

5+
# =============================================================================
46
# Build stage
5-
FROM rust:1.75-bookworm as builder
7+
# =============================================================================
8+
FROM rust:1.75-bookworm AS builder
69

710
WORKDIR /app
811

912
# Install protobuf compiler
10-
RUN apt-get update && apk add --no-cache -y protobuf-compiler && rm -rf /var/lib/apt/lists/*
13+
RUN apt-get update && \
14+
apt-get install -y --no-install-recommends protobuf-compiler && \
15+
rm -rf /var/lib/apt/lists/*
1116

12-
# Copy manifests
17+
# Copy manifests first for dependency caching
1318
COPY Cargo.toml Cargo.lock ./
1419

1520
# Create dummy src to cache dependencies
1621
RUN mkdir -p src proto && \
1722
echo "fn main() {}" > src/main.rs && \
1823
echo 'syntax = "proto3"; package dummy;' > proto/optimizer.proto
1924

20-
# Build dependencies (cached)
25+
# Build dependencies (cached layer)
2126
RUN cargo build --release && rm -rf src proto
2227

2328
# Copy actual source
2429
COPY . .
2530

26-
# Touch main.rs to force rebuild
31+
# Touch main.rs to force rebuild with actual source
2732
RUN touch src/main.rs
2833

2934
# Build release binary
3035
RUN cargo build --release
3136

32-
# Runtime stage
33-
FROM cgr.dev/chainguard/wolfi-base:bookworm-slim
37+
# =============================================================================
38+
# Runtime stage - Distroless
39+
# =============================================================================
40+
FROM gcr.io/distroless/cc-debian12:nonroot
3441

3542
WORKDIR /app
3643

37-
# Install runtime dependencies
38-
RUN apt-get update && \
39-
apk add --no-cache -y ca-certificates && \
40-
rm -rf /var/lib/apt/lists/*
41-
4244
# Copy binary from builder
4345
COPY --from=builder /app/target/release/veds-optimizer /app/veds-optimizer
4446

45-
# Create non-root user
46-
RUN useradd -r -s /bin/false veds
47-
USER veds
48-
4947
# Expose ports
5048
EXPOSE 50051 8090
5149

52-
# Health check
53-
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s \
54-
CMD curl -f http://localhost:8090/health || exit 1
50+
# Run as nonroot user (uid 65532)
51+
USER nonroot
52+
53+
# Distroless has no shell, so no HEALTHCHECK possible here
54+
# Health checks are defined in docker-compose.yml
5555

5656
# Run
57-
CMD ["/app/veds-optimizer"]
57+
ENTRYPOINT ["/app/veds-optimizer"]

src/rust-routing/Dockerfile

Lines changed: 0 additions & 57 deletions
This file was deleted.

0 commit comments

Comments
 (0)