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.
This commit is contained in:
1 parent
944bb52827
commit
37711a0a8a
1 file changed
+1
-1
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
# build — keep this tag >= the current MSRV of the dependency tree.
|
# build — keep this tag >= the current MSRV of the dependency tree.
|
||||||
FROM rust:1.90-bookworm AS builder
|
FROM rust:1.90-bookworm AS builder
|
||||||
WORKDIR /build
|
WORKDIR /build
|
||||||
ENV CARGO_BUILD_JOBS=2
|
ENV CARGO_BUILD_JOBS=1
|
||||||
COPY Cargo.toml Cargo.lock* ./
|
COPY Cargo.toml Cargo.lock* ./
|
||||||
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src
|
RUN mkdir src && echo "fn main() {}" > src/main.rs && cargo build --release && rm -rf src
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Reference in new issue
Block a user