Update pipeline

This commit is contained in:
Santiago Lo Coco 2023-10-23 16:00:34 -03:00
parent 0b8f16efa2
commit 7a8861df16
1 changed files with 18 additions and 7 deletions

View File

@ -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