From 4e2756eee5835f20d0d7ffb448dcdfcac8689878 Mon Sep 17 00:00:00 2001 From: miczek Date: Thu, 15 Oct 2026 03:53:25 +0300 Subject: [PATCH] ci: Pi-hole DNS, npm/nuget cache, serial low-RAM builds MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use LAN Traefik DNS, persist package caches under /drone-cache, and keep api→shop→admin serial with single workers for the 2GiB limit. Co-authored-by: Cursor --- .drone.yml | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 8d13b21..dc1a35f 100644 --- a/.drone.yml +++ b/.drone.yml @@ -4,11 +4,8 @@ # ssh_port — optional, default 22 # deploy_path — absolute path on host (e.g. /opt/iled-shop) # -# First-time host setup: -# 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 -# -# Pi note: steps serialize workers so builds fit under DRONE_MEMORY_LIMIT (~2GiB). +# Homelab runner: Pi-hole DNS → Traefik LAN; /drone-cache for npm/nuget. +# Steps stay serial + single-worker so builds fit under DRONE_MEMORY_LIMIT (~2GiB). kind: pipeline type: docker @@ -18,6 +15,9 @@ platform: os: linux arch: arm64 +dns: + - 192.168.0.64 + clone: depth: 50 @@ -27,10 +27,15 @@ concurrency: steps: - name: api image: mcr.microsoft.com/dotnet/sdk:10.0 + pull: false environment: - # One MSBuild node; disable node reuse — lower peak RAM on 4GB Pi DOTNET_CLI_TELEMETRY_OPTOUT: "1" + DOTNET_NOLOGO: "1" MSBUILDDISABLENODEREUSE: "1" + NUGET_PACKAGES: /drone-cache/nuget + NUGET_HTTP_CACHE_PATH: /drone-cache/nuget-http + DOTNET_CLI_HOME: /drone-cache/dotnet + NUGET_XMLDOC_MODE: skip commands: - cd src/backend - dotnet restore iLED.slnx @@ -38,24 +43,28 @@ steps: - name: shop image: node:22-bookworm + pull: false environment: NG_BUILD_MAX_WORKERS: "1" NODE_OPTIONS: "--max-old-space-size=1536" + npm_config_cache: /drone-cache/npm commands: - cd src/shop - - npm ci + - npm ci --prefer-offline - npm run build -- --configuration=production depends_on: - api - name: admin image: node:22-bookworm + pull: false environment: NG_BUILD_MAX_WORKERS: "1" NODE_OPTIONS: "--max-old-space-size=1536" + npm_config_cache: /drone-cache/npm commands: - cd src/admin - - npm ci + - npm ci --prefer-offline - npm run build -- --configuration=production depends_on: - shop @@ -75,6 +84,9 @@ platform: os: linux arch: arm64 +dns: + - 192.168.0.64 + depends_on: - ci @@ -87,6 +99,7 @@ concurrency: steps: - name: ssh-deploy image: appleboy/drone-ssh + pull: false settings: host: from_secret: ssh_host