ci: Pi-hole DNS, npm/nuget cache, serial low-RAM builds
continuous-integration/drone/push Build is failing
continuous-integration/drone/push Build is failing
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 <cursoragent@cursor.com>
This commit is contained in:
1 parent
17393dba5e
commit
4e2756eee5
1 file changed
+21
-8
+21
-8
@@ -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
|
||||
|
||||
Reference in new issue
Block a user