From cd1d843c9fa046245aaa12c8ce322bb8a4ba0699 Mon Sep 17 00:00:00 2001 From: Trezy Date: Mon, 16 Feb 2026 16:11:33 -0600 Subject: [PATCH] fix: improve AIP proxy error logging and cache Rust deps in Docker --- Dockerfile | 8 ++++++-- src/aip.rs | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9dbd6dc..ec83fb0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,11 +10,15 @@ FROM rust:1.93 AS builder WORKDIR /app +# Build dependencies first (cached until Cargo.toml/Cargo.lock change) COPY Cargo.toml Cargo.lock ./ +RUN mkdir src && echo "fn main() {}" > src/main.rs && touch src/lib.rs +ENV SQLX_OFFLINE=true +RUN cargo build --release && rm -rf src target/release/.fingerprint/happyview-* + +# Build application code COPY src/ src/ COPY migrations/ migrations/ - -ENV SQLX_OFFLINE=true RUN cargo build --release FROM debian:bookworm-slim diff --git a/src/aip.rs b/src/aip.rs index 29daa07..3ac7e40 100644 --- a/src/aip.rs +++ b/src/aip.rs @@ -43,7 +43,7 @@ pub async fn aip_proxy( let upstream_resp = match req.send().await { Ok(r) => r, Err(e) => { - tracing::error!("AIP proxy error: {e}"); + tracing::error!("AIP proxy error: {e:#}"); return Response::builder() .status(StatusCode::BAD_GATEWAY) .body(Body::from("upstream request failed")) -- 2.54.0