Simplify Dockerfile to use pre-built musl binary, add Ingress
- Dockerfile: drop Rust build stage, COPY static musl binary directly - Add traefik Ingress for tori.oci.euphon.net with LE cert Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
12
Dockerfile
12
Dockerfile
@@ -6,19 +6,11 @@ RUN npm ci
|
||||
COPY web/ ./
|
||||
RUN npm run build
|
||||
|
||||
# Stage 2: Build backend
|
||||
FROM rust:1.86-alpine AS backend
|
||||
RUN apk add --no-cache musl-dev
|
||||
WORKDIR /app
|
||||
COPY Cargo.toml Cargo.lock ./
|
||||
COPY src/ ./src/
|
||||
RUN cargo build --release
|
||||
|
||||
# Stage 3: Runtime
|
||||
# Stage 2: Runtime
|
||||
FROM alpine:3.21
|
||||
RUN apk add --no-cache ca-certificates
|
||||
WORKDIR /app
|
||||
COPY --from=backend /app/target/release/tori .
|
||||
COPY target/aarch64-unknown-linux-musl/release/tori .
|
||||
COPY --from=frontend /app/web/dist ./web/dist/
|
||||
COPY config.yaml .
|
||||
|
||||
|
||||
Reference in New Issue
Block a user