From 085b3169f62344e55a34b4256af883aceac74d6e Mon Sep 17 00:00:00 2001 From: Ashwin Kumar Date: Thu, 9 Apr 2026 05:55:50 +0200 Subject: [PATCH] fix: limit CARGO_BUILD_JOBS=2 to reduce OOM during parallel matrix builds --- apps/catering_services/Dockerfile | 1 + apps/companies/Dockerfile | 1 + apps/cron/Dockerfile | 1 + apps/customers/Dockerfile | 1 + apps/developers/Dockerfile | 1 + apps/employees/Dockerfile | 1 + apps/fitness_trainers/Dockerfile | 1 + apps/gateway/Dockerfile | 1 + apps/graphic_designers/Dockerfile | 1 + apps/job_seekers/Dockerfile | 1 + apps/makeup_artists/Dockerfile | 1 + apps/payments/Dockerfile | 1 + apps/photographers/Dockerfile | 1 + apps/social_media_managers/Dockerfile | 1 + apps/tutors/Dockerfile | 1 + apps/ugc_content_creators/Dockerfile | 1 + apps/users/Dockerfile | 1 + apps/video_editors/Dockerfile | 1 + 18 files changed, 18 insertions(+) diff --git a/apps/catering_services/Dockerfile b/apps/catering_services/Dockerfile index fcdb490..f372cc4 100644 --- a/apps/catering_services/Dockerfile +++ b/apps/catering_services/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin catering_services FROM debian:bookworm-slim AS runtime diff --git a/apps/companies/Dockerfile b/apps/companies/Dockerfile index 57270ba..2254ccf 100644 --- a/apps/companies/Dockerfile +++ b/apps/companies/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin companies FROM debian:bookworm-slim AS runtime diff --git a/apps/cron/Dockerfile b/apps/cron/Dockerfile index 8beffbb..76b9c7c 100644 --- a/apps/cron/Dockerfile +++ b/apps/cron/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin cron FROM debian:bookworm-slim AS runtime diff --git a/apps/customers/Dockerfile b/apps/customers/Dockerfile index 802e02a..795b72f 100644 --- a/apps/customers/Dockerfile +++ b/apps/customers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin customers FROM debian:bookworm-slim AS runtime diff --git a/apps/developers/Dockerfile b/apps/developers/Dockerfile index 34c7f9e..383bcd9 100644 --- a/apps/developers/Dockerfile +++ b/apps/developers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin developers FROM debian:bookworm-slim AS runtime diff --git a/apps/employees/Dockerfile b/apps/employees/Dockerfile index b74e0fe..a45b894 100644 --- a/apps/employees/Dockerfile +++ b/apps/employees/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin employees FROM debian:bookworm-slim AS runtime diff --git a/apps/fitness_trainers/Dockerfile b/apps/fitness_trainers/Dockerfile index 6c4d4a8..59fa1d3 100644 --- a/apps/fitness_trainers/Dockerfile +++ b/apps/fitness_trainers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin fitness_trainers FROM debian:bookworm-slim AS runtime diff --git a/apps/gateway/Dockerfile b/apps/gateway/Dockerfile index f257c2b..15b7a89 100644 --- a/apps/gateway/Dockerfile +++ b/apps/gateway/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin gateway FROM debian:bookworm-slim AS runtime diff --git a/apps/graphic_designers/Dockerfile b/apps/graphic_designers/Dockerfile index 2975083..813cf0f 100644 --- a/apps/graphic_designers/Dockerfile +++ b/apps/graphic_designers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin graphic_designers FROM debian:bookworm-slim AS runtime diff --git a/apps/job_seekers/Dockerfile b/apps/job_seekers/Dockerfile index f55fb39..e1fbd32 100644 --- a/apps/job_seekers/Dockerfile +++ b/apps/job_seekers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin job_seekers FROM debian:bookworm-slim AS runtime diff --git a/apps/makeup_artists/Dockerfile b/apps/makeup_artists/Dockerfile index b639143..2a7be48 100644 --- a/apps/makeup_artists/Dockerfile +++ b/apps/makeup_artists/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin makeup_artists FROM debian:bookworm-slim AS runtime diff --git a/apps/payments/Dockerfile b/apps/payments/Dockerfile index b943b42..9951cd9 100644 --- a/apps/payments/Dockerfile +++ b/apps/payments/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin payments FROM debian:bookworm-slim AS runtime diff --git a/apps/photographers/Dockerfile b/apps/photographers/Dockerfile index 0fca638..f71a587 100644 --- a/apps/photographers/Dockerfile +++ b/apps/photographers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin photographers FROM debian:bookworm-slim AS runtime diff --git a/apps/social_media_managers/Dockerfile b/apps/social_media_managers/Dockerfile index 44efe2c..88f1d1c 100644 --- a/apps/social_media_managers/Dockerfile +++ b/apps/social_media_managers/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin social_media_managers FROM debian:bookworm-slim AS runtime diff --git a/apps/tutors/Dockerfile b/apps/tutors/Dockerfile index 612c257..899277a 100644 --- a/apps/tutors/Dockerfile +++ b/apps/tutors/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin tutors FROM debian:bookworm-slim AS runtime diff --git a/apps/ugc_content_creators/Dockerfile b/apps/ugc_content_creators/Dockerfile index c0156c4..aa2c383 100644 --- a/apps/ugc_content_creators/Dockerfile +++ b/apps/ugc_content_creators/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin ugc_content_creators FROM debian:bookworm-slim AS runtime diff --git a/apps/users/Dockerfile b/apps/users/Dockerfile index 1c163e1..f277c10 100644 --- a/apps/users/Dockerfile +++ b/apps/users/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin users FROM debian:bookworm-slim AS runtime diff --git a/apps/video_editors/Dockerfile b/apps/video_editors/Dockerfile index 5233900..e2801b9 100644 --- a/apps/video_editors/Dockerfile +++ b/apps/video_editors/Dockerfile @@ -12,6 +12,7 @@ COPY crates ./crates COPY apps ./apps ENV SQLX_OFFLINE=true +ENV CARGO_BUILD_JOBS=2 RUN cargo build --release --bin video_editors FROM debian:bookworm-slim AS runtime