Add local Docker registry: registry:2 on :5000, build-push.sh, CI auto-deploy

- docker-compose services now pull from localhost:5000 instead of building locally
- build-push.sh builds + pushes all 5 Node images to local registry
- CI workflows get build-push job: test → build → push → deploy
- Deploy becomes: docker compose pull && docker compose up -d
- Eliminates silent git pull + stale Docker cache issues
This commit is contained in:
2026-03-02 05:15:37 +00:00
parent 2c9408b1df
commit 41e016e9a6
7 changed files with 180 additions and 15 deletions

View File

@@ -48,3 +48,21 @@ jobs:
- name: Test
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/saas && npm test
build-push:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
run: git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Build and push
run: |
cd $GITHUB_WORKSPACE/products
docker build -t localhost:5000/dd0c-drift:latest ./02-iac-drift-detection/saas
docker push localhost:5000/dd0c-drift:latest
- name: Deploy
run: |
cd $GITHUB_WORKSPACE/products
docker compose pull drift
docker compose up -d drift

View File

@@ -23,3 +23,21 @@ jobs:
- name: Test
run: cd $GITHUB_WORKSPACE/products/03-alert-intelligence && npm test
build-push:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
run: git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Build and push
run: |
cd $GITHUB_WORKSPACE/products
docker build -t localhost:5000/dd0c-alert:latest ./03-alert-intelligence
docker push localhost:5000/dd0c-alert:latest
- name: Deploy
run: |
cd $GITHUB_WORKSPACE/products
docker compose pull alert
docker compose up -d alert

View File

@@ -23,3 +23,21 @@ jobs:
- name: Test
run: cd $GITHUB_WORKSPACE/products/04-lightweight-idp && npm test
build-push:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
run: git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Build and push
run: |
cd $GITHUB_WORKSPACE/products
docker build -t localhost:5000/dd0c-portal:latest ./04-lightweight-idp
docker push localhost:5000/dd0c-portal:latest
- name: Deploy
run: |
cd $GITHUB_WORKSPACE/products
docker compose pull portal
docker compose up -d portal

View File

@@ -23,3 +23,21 @@ jobs:
- name: Test
run: cd $GITHUB_WORKSPACE/products/05-aws-cost-anomaly && npm test
build-push:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
run: git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Build and push
run: |
cd $GITHUB_WORKSPACE/products
docker build -t localhost:5000/dd0c-cost:latest ./05-aws-cost-anomaly
docker push localhost:5000/dd0c-cost:latest
- name: Deploy
run: |
cd $GITHUB_WORKSPACE/products
docker compose pull cost
docker compose up -d cost

View File

@@ -23,3 +23,21 @@ jobs:
- name: Test
run: cd $GITHUB_WORKSPACE/products/06-runbook-automation/saas && npm test
build-push:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout
run: git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Build and push
run: |
cd $GITHUB_WORKSPACE/products
docker build -t localhost:5000/dd0c-run:latest ./06-runbook-automation/saas
docker push localhost:5000/dd0c-run:latest
- name: Deploy
run: |
cd $GITHUB_WORKSPACE/products
docker compose pull run
docker compose up -d run