portfolio view

This commit is contained in:
2026-03-18 23:20:32 +01:00
parent e815c02f70
commit 908206b5cd
104 changed files with 3755 additions and 3689 deletions

View File

@@ -1,4 +1,3 @@
stages:
- build
- publish
@@ -131,6 +130,26 @@ build-auth-view:
changes:
- auth-view/**/*
build-portfolio-view:
stage: build
image: node:22-alpine
cache:
key: "${CI_COMMIT_REF_SLUG}-portfolio-view"
paths:
- portfolio-view/node_modules
script:
- cd portfolio-view
- npm ci
- npm run build
artifacts:
paths:
- portfolio-view/dist
expire_in: 1h
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- portfolio-view/**/*
# ══════════════════════════════════════════════════════════
# PUBLISH DOCKER IMAGES
# ══════════════════════════════════════════════════════════
@@ -249,6 +268,25 @@ publish-auth-view:
changes:
- auth-view/**/*
publish-portfolio-view:
stage: publish
image: docker:27
services:
- docker:27-dind
variables:
DOCKER_TLS_CERTDIR: ""
before_script:
- echo "$CI_REGISTRY_PASSWORD" | docker login $CI_REGISTRY -u $CI_REGISTRY_USER --password-stdin
script:
- docker build -t $REGISTRY/portfolio-view:${CI_COMMIT_SHORT_SHA} -t $REGISTRY/portfolio-view:latest -f portfolio-view/docker/Dockerfile portfolio-view/
- docker push $REGISTRY/portfolio-view:${CI_COMMIT_SHORT_SHA}
- docker push $REGISTRY/portfolio-view:latest
needs: [build-portfolio-view]
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- portfolio-view/**/*
# ══════════════════════════════════════════════════════════
# DEPLOY TO VPS
# ══════════════════════════════════════════════════════════
@@ -281,6 +319,7 @@ deploy-rag:
cd /opt/services
export CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA}
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull rag-service
curl -s http://localhost:8500/v1/health/state/critical | jq -r '.[].ServiceID' | xargs -I{} curl -X PUT http://localhost:8500/v1/agent/service/deregister/{}
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d rag-service
docker image prune -af
ENDSSH
@@ -300,6 +339,7 @@ deploy-gateway:
cd /opt/services
export CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA}
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull gateway-service
curl -s http://localhost:8500/v1/health/state/critical | jq -r '.[].ServiceID' | xargs -I{} curl -X PUT http://localhost:8500/v1/agent/service/deregister/{}
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d gateway-service
docker image prune -af
ENDSSH
@@ -319,6 +359,7 @@ deploy-analytics:
cd /opt/services
export CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA}
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull analytics-service
curl -s http://localhost:8500/v1/health/state/critical | jq -r '.[].ServiceID' | xargs -I{} curl -X PUT http://localhost:8500/v1/agent/service/deregister/{}
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d analytics-service
docker image prune -af
ENDSSH
@@ -380,6 +421,25 @@ deploy-auth-view:
docker image prune -af
ENDSSH
deploy-portfolio-view:
<<: *deploy_setup
needs: [publish-portfolio-view]
rules:
- if: $CI_COMMIT_BRANCH == "main"
changes:
- portfolio-view/**/*
script:
- |
ssh $VPS_USER@$VPS_HOST << ENDSSH
set -e
echo "$CI_REGISTRY_PASSWORD" | docker login registry.gitlab.com -u "$CI_REGISTRY_USER" --password-stdin
cd /opt/services
export CI_COMMIT_SHORT_SHA=${CI_COMMIT_SHORT_SHA}
docker compose -f docker-compose.yml -f docker-compose.prod.yml pull portfolio-view
docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d portfolio-view
docker image prune -af
ENDSSH
# Deploy all services at once (manual trigger)
deploy-all:
<<: *deploy_setup