mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-15 01:01:09 +02:00
feat(infra): add sveltekit-base image and build-app script for Mac Mini
- Add docker/Dockerfile.sveltekit-base: pre-built base with all 34 shared packages (mirrors nestjs-base pattern), eliminates redundant COPY/build steps from individual web Dockerfiles - Add scripts/mac-mini/build-app.sh: stops monitoring stack before build to free RAM, auto-restarts on exit (trap cleanup) - Migrate todo web Dockerfile to use sveltekit-base:local (47 COPY lines → 2, 4 build steps → 0) - Update CD workflow to build sveltekit-base when deploying web apps Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c681a5d66a
commit
cdfbfcd13e
4 changed files with 233 additions and 61 deletions
21
.github/workflows/cd-macmini.yml
vendored
21
.github/workflows/cd-macmini.yml
vendored
|
|
@ -243,12 +243,29 @@ jobs:
|
|||
done
|
||||
fi
|
||||
|
||||
NEEDS_WEB_BASE=false
|
||||
if [ "$DEPLOY_ALL" == "true" ]; then
|
||||
NEEDS_WEB_BASE=true
|
||||
else
|
||||
for svc in $SERVICES; do
|
||||
case "$svc" in *-web) NEEDS_WEB_BASE=true; break ;; esac
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$NEEDS_BASE" == "true" ]; then
|
||||
echo "=== Building shared NestJS base image ==="
|
||||
docker build -f docker/Dockerfile.nestjs-base -t nestjs-base:local . 2>&1 | tail -5
|
||||
echo "Base image built"
|
||||
echo "NestJS base image built"
|
||||
else
|
||||
echo "No backends to deploy, skipping base image"
|
||||
echo "No backends to deploy, skipping NestJS base image"
|
||||
fi
|
||||
|
||||
if [ "$NEEDS_WEB_BASE" == "true" ]; then
|
||||
echo "=== Building shared SvelteKit base image ==="
|
||||
docker build -f docker/Dockerfile.sveltekit-base -t sveltekit-base:local . 2>&1 | tail -5
|
||||
echo "SvelteKit base image built"
|
||||
else
|
||||
echo "No web apps to deploy, skipping SvelteKit base image"
|
||||
fi
|
||||
|
||||
- name: Build and deploy services
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue