mirror of
https://gitlab.dit.htwk-leipzig.de/htwk-software/htwkalender.git
synced 2025-08-06 19:59:13 +02:00
fix:#00 always restart containers and change rules of oci build jobs
This commit is contained in:
@@ -103,6 +103,8 @@ build-backend-image:
|
|||||||
- docker push $CI_DOCKER_REGISTRY_REPO:backend
|
- docker push $CI_DOCKER_REGISTRY_REPO:backend
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
changes:
|
||||||
|
- backend/**/*
|
||||||
|
|
||||||
build-frontend-image:
|
build-frontend-image:
|
||||||
stage: oci-build
|
stage: oci-build
|
||||||
@@ -124,6 +126,8 @@ build-frontend-image:
|
|||||||
- docker push $CI_DOCKER_REGISTRY_REPO:frontend
|
- docker push $CI_DOCKER_REGISTRY_REPO:frontend
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
changes:
|
||||||
|
- frontend/**/*
|
||||||
|
|
||||||
deploy-all:
|
deploy-all:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
@@ -145,8 +149,5 @@ deploy-all:
|
|||||||
"cd /home/$CI_SSH_USER/docker/htwkalender/ &&
|
"cd /home/$CI_SSH_USER/docker/htwkalender/ &&
|
||||||
docker login -u $CI_DOCKER_REGISTRY_USER -p $CI_DOCKER_REGISTRY_PASSWORD $CI_DOCKER_REGISTRY &&
|
docker login -u $CI_DOCKER_REGISTRY_USER -p $CI_DOCKER_REGISTRY_PASSWORD $CI_DOCKER_REGISTRY &&
|
||||||
docker compose -f ./docker-compose.prod.yml down && docker compose -f ./docker-compose.prod.yml up -d --remove-orphans && docker logout"
|
docker compose -f ./docker-compose.prod.yml down && docker compose -f ./docker-compose.prod.yml up -d --remove-orphans && docker logout"
|
||||||
needs:
|
|
||||||
- build-frontend-image
|
|
||||||
- build-backend-image
|
|
||||||
rules:
|
rules:
|
||||||
- if: $CI_COMMIT_BRANCH == "main"
|
- if: $CI_COMMIT_BRANCH == "main"
|
||||||
|
@@ -5,6 +5,7 @@ services:
|
|||||||
image: DOCKER_REGISTRY_REPO:backend # DOCKER_REGISTRY_REPO will be replaced by CI
|
image: DOCKER_REGISTRY_REPO:backend # DOCKER_REGISTRY_REPO will be replaced by CI
|
||||||
command: "--http=0.0.0.0:8090 --dir=/htwkalender/data/pb_data"
|
command: "--http=0.0.0.0:8090 --dir=/htwkalender/data/pb_data"
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
|
restart: always
|
||||||
# open port 8090
|
# open port 8090
|
||||||
ports:
|
ports:
|
||||||
- "8090:8090"
|
- "8090:8090"
|
||||||
@@ -14,6 +15,7 @@ services:
|
|||||||
htwkalender-frontend:
|
htwkalender-frontend:
|
||||||
image: DOCKER_REGISTRY_REPO:frontend # DOCKER_REGISTRY_REPO will be replaced by CI
|
image: DOCKER_REGISTRY_REPO:frontend # DOCKER_REGISTRY_REPO will be replaced by CI
|
||||||
pull_policy: always
|
pull_policy: always
|
||||||
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8000:8000"
|
- "8000:8000"
|
||||||
depends_on:
|
depends_on:
|
||||||
@@ -21,6 +23,7 @@ services:
|
|||||||
|
|
||||||
rproxy:
|
rproxy:
|
||||||
image: bitnami/nginx:1.25
|
image: bitnami/nginx:1.25
|
||||||
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- ./reverseproxy.conf:/opt/bitnami/nginx/conf/nginx.conf
|
- ./reverseproxy.conf:/opt/bitnami/nginx/conf/nginx.conf
|
||||||
depends_on:
|
depends_on:
|
||||||
|
Reference in New Issue
Block a user