Cap MSBuild to one node and Angular to one worker so api/shop/admin fit under the 2GiB Drone step limit (slower, less OOM). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
da9e63e9fc
commit
17393dba5e
1 file changed
+17
-1
+17
-1
@@ -7,6 +7,8 @@
|
|||||||
# First-time host setup:
|
# First-time host setup:
|
||||||
# git clone ssh://git@git.zea.lt:2222/miczek/iled-shop.git $DEPLOY_PATH
|
# git clone ssh://git@git.zea.lt:2222/miczek/iled-shop.git $DEPLOY_PATH
|
||||||
# cd $DEPLOY_PATH/docker && cp .env.example .env # then edit secrets
|
# cd $DEPLOY_PATH/docker && cp .env.example .env # then edit secrets
|
||||||
|
#
|
||||||
|
# Pi note: steps serialize workers so builds fit under DRONE_MEMORY_LIMIT (~2GiB).
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: docker
|
||||||
@@ -25,24 +27,38 @@ concurrency:
|
|||||||
steps:
|
steps:
|
||||||
- name: api
|
- name: api
|
||||||
image: mcr.microsoft.com/dotnet/sdk:10.0
|
image: mcr.microsoft.com/dotnet/sdk:10.0
|
||||||
|
environment:
|
||||||
|
# One MSBuild node; disable node reuse — lower peak RAM on 4GB Pi
|
||||||
|
DOTNET_CLI_TELEMETRY_OPTOUT: "1"
|
||||||
|
MSBUILDDISABLENODEREUSE: "1"
|
||||||
commands:
|
commands:
|
||||||
- cd src/backend
|
- cd src/backend
|
||||||
- dotnet restore iLED.slnx
|
- dotnet restore iLED.slnx
|
||||||
- dotnet build iLED.slnx -c Release --no-restore
|
- dotnet build iLED.slnx -c Release --no-restore -m:1
|
||||||
|
|
||||||
- name: shop
|
- name: shop
|
||||||
image: node:22-bookworm
|
image: node:22-bookworm
|
||||||
|
environment:
|
||||||
|
NG_BUILD_MAX_WORKERS: "1"
|
||||||
|
NODE_OPTIONS: "--max-old-space-size=1536"
|
||||||
commands:
|
commands:
|
||||||
- cd src/shop
|
- cd src/shop
|
||||||
- npm ci
|
- npm ci
|
||||||
- npm run build -- --configuration=production
|
- npm run build -- --configuration=production
|
||||||
|
depends_on:
|
||||||
|
- api
|
||||||
|
|
||||||
- name: admin
|
- name: admin
|
||||||
image: node:22-bookworm
|
image: node:22-bookworm
|
||||||
|
environment:
|
||||||
|
NG_BUILD_MAX_WORKERS: "1"
|
||||||
|
NODE_OPTIONS: "--max-old-space-size=1536"
|
||||||
commands:
|
commands:
|
||||||
- cd src/admin
|
- cd src/admin
|
||||||
- npm ci
|
- npm ci
|
||||||
- npm run build -- --configuration=production
|
- npm run build -- --configuration=production
|
||||||
|
depends_on:
|
||||||
|
- shop
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
event:
|
event:
|
||||||
|
|||||||
Reference in new issue
Block a user