From bf53f9b65c8748ff86b077c2390393795a112c1e Mon Sep 17 00:00:00 2001 From: balex Date: Fri, 27 Feb 2026 20:34:18 +0100 Subject: [PATCH] ragview --- .gitlab-ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8fe8ad1..749047b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -70,6 +70,26 @@ build-analytics: - analytics-service/**/* - if: $CI_COMMIT_BRANCH == "main" +build-rag-view: + stage: build + image: node:22-alpine + cache: + key: "${CI_COMMIT_REF_SLUG}-rag-view" + paths: + - rag-view/node_modules + script: + - cd rag-view + - npm ci + - npm run build + artifacts: + paths: + - rag-view/dist + expire_in: 1h + rules: + - changes: + - rag-view/**/* + - if: $CI_COMMIT_BRANCH == "main" + # ══════════════════════════════════════════════════════════ # PUBLISH DOCKER IMAGES # ══════════════════════════════════════════════════════════ @@ -131,6 +151,25 @@ publish-analytics: - analytics-service/**/* - if: $CI_COMMIT_BRANCH == "main" +publish-rag-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/rag-view:${CI_COMMIT_SHORT_SHA} -t $REGISTRY/rag-view:latest -f rag-view/docker/Dockerfile rag-view/ + - docker push $REGISTRY/rag-view:${CI_COMMIT_SHORT_SHA} + - docker push $REGISTRY/rag-view:latest + needs: [build-rag-view] + rules: + - changes: + - rag-view/**/* + - if: $CI_COMMIT_BRANCH == "main" + # ══════════════════════════════════════════════════════════ # DEPLOY TO VPS # ══════════════════════════════════════════════════════════ @@ -194,6 +233,21 @@ deploy-analytics: docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d analytics-service docker image prune -af ENDSSH + +deploy-rag-view: + <<: *deploy_setup + needs: [publish-rag-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 rag-view + docker compose -f docker-compose.yml -f docker-compose.prod.yml up -d rag-view + docker image prune -af + ENDSSH # Deploy all services at once (manual trigger) deploy-all: