From 7a8861df167a68fd529c4d91cafc5a33cbeba930 Mon Sep 17 00:00:00 2001 From: Santiago Lo Coco Date: Mon, 23 Oct 2023 16:00:34 -0300 Subject: [PATCH] Update pipeline --- .gitlab-ci.yml | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c3df8ad..6eac134 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -271,15 +271,26 @@ deploy-prod: script: - export $(cat context.env | xargs) - - export API_IMAGE=$DOCKER_HUB_API_IMAGE - - export CLIENT_IMAGE=$DOCKER_HUB_CLIENT_IMAGE - - docker login -u $DOCKER_HUB_USER --password $DOCKER_HUB_PASS - - docker compose -f docker-compose.yml --env-file $ENV_PROD_FILE stop - - docker compose -f docker-compose.yml --env-file $ENV_PROD_FILE rm -f - - docker compose -f docker-compose.yml --env-file $ENV_PROD_FILE pull - - docker compose -f docker-compose.yml --env-file $ENV_PROD_FILE up -d + - export API_IMAGE=$DOCKER_HUB_FLIGHT_INFO_IMAGE + - docker compose -f flights-domain/docker-compose.yml --env-file $ENV_PROD_FILE stop + - docker compose -f flights-domain/docker-compose.yml --env-file $ENV_PROD_FILE rm -f + - docker compose -f flights-domain/docker-compose.yml --env-file $ENV_PROD_FILE pull + - docker compose -f flights-domain/docker-compose.yml --env-file $ENV_PROD_FILE up -d + + - export API_IMAGE=$DOCKER_HUB_USER_MANAGER_IMAGE + - docker compose -f auth-domain/docker-compose.yml --env-file $ENV_PROD_FILE stop + - docker compose -f auth-domain/docker-compose.yml --env-file $ENV_PROD_FILE rm -f + - docker compose -f auth-domain/docker-compose.yml --env-file $ENV_PROD_FILE pull + - docker compose -f auth-domain/docker-compose.yml --env-file $ENV_PROD_FILE up -d + - docker compose -f auth-domain/docker-compose.yml --env-file $ENV_PROD_FILE exec usermanager-api python manage.py recreate_db + - docker compose -f auth-domain/docker-compose.yml --env-file $ENV_PROD_FILE exec usermanager-api python manage.py seed_db + + - export CLIENT_IMAGE=$DOCKER_HUB_SCREEN_CLIENT_IMAGE + - docker compose -f screen-domain/docker-compose.yml up -d + - export CLIENT_IMAGE=$DOCKER_HUB_BROWSER_CLIENT_IMAGE + - docker compose -f browser-domain/docker-compose.yml up -d needs: - job: deliver-dockerhub - job: preparation