From 37711a0a8a412a290158cc8141574bb221bbc547 Mon Sep 17 00:00:00 2001 From: "phattaranun.a" Date: Sat, 10 Oct 2026 17:14:38 +0700 Subject: [PATCH] fix(backend): cap cargo parallelism to 1 for the VPS build CARGO_BUILD_JOBS=2 on the 1-vCPU VPS spiked load (~30) and destabilised the swarm during deploy (health checks timed out, Dokploy restarted and killed the build). Build with a single job; combined with the 4 GB swapfile added on the host this keeps the build from starving services. --- backend/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/Dockerfile b/backend/Dockerfile index 7588219..c3833d6 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -4,7 +4,7 @@ # build — keep this tag >= the current MSRV of the dependency tree. FROM rust:1.90-bookworm AS builder WORKDIR /build -ENV CARGO_BUILD_JOBS=2 +ENV CARGO_BUILD_JOBS=1 COPY Cargo.toml Cargo.lock* ./ RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src COPY . .