ragview
This commit is contained in:
@@ -70,6 +70,26 @@ build-analytics:
|
|||||||
- analytics-service/**/*
|
- analytics-service/**/*
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- 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
|
# PUBLISH DOCKER IMAGES
|
||||||
# ══════════════════════════════════════════════════════════
|
# ══════════════════════════════════════════════════════════
|
||||||
@@ -131,6 +151,25 @@ publish-analytics:
|
|||||||
- analytics-service/**/*
|
- analytics-service/**/*
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- 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
|
# 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 compose -f docker-compose.yml -f docker-compose.prod.yml up -d analytics-service
|
||||||
docker image prune -af
|
docker image prune -af
|
||||||
ENDSSH
|
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 services at once (manual trigger)
|
||||||
deploy-all:
|
deploy-all:
|
||||||
|
|||||||
Reference in New Issue
Block a user