sbt-idp/deploy_images.sh

35 lines
1.6 KiB
Bash
Raw Normal View History

2023-12-21 05:55:14 +00:00
#!/bin/bash
2023-12-26 07:10:59 +00:00
set -e
2023-12-21 05:55:14 +00:00
tag=$1
2024-01-09 12:41:17 +00:00
# is_prod=${$2:-False}
2023-12-21 05:55:14 +00:00
2023-12-22 03:54:04 +00:00
echo "[INFO] Tag received from Python: $tag"
2023-12-21 05:55:14 +00:00
2024-02-29 06:12:50 +00:00
# echo "[INFO] Updating everything the remote..."
# git submodule update --recursive --remote
2024-01-02 05:39:10 +00:00
2023-12-26 11:44:25 +00:00
echo "[INFO] Pushing AI image with tag: $tag..."
docker compose -f docker-compose-dev.yml build cope2n-fi-sbt
2024-01-11 10:38:12 +00:00
docker tag sidp/cope2n-ai-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:${tag}
docker push public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:${tag}
# docker tag sidp/cope2n-ai-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:production
# docker push public.ecr.aws/sdsrv/sidp/cope2n-ai-fi-sbt:production
2023-12-21 05:55:14 +00:00
2023-12-26 11:44:25 +00:00
echo "[INFO] Pushing BE image with tag: $tag..."
docker compose -f docker-compose-dev.yml build be-ctel-sbt
2024-01-11 10:38:12 +00:00
docker tag sidp/cope2n-be-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:${tag}
# docker tag sidp/cope2n-be-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:production
docker push public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:${tag}
# docker push public.ecr.aws/sdsrv/sidp/cope2n-be-fi-sbt:production
2023-12-21 05:55:14 +00:00
2023-12-26 11:44:25 +00:00
echo "[INFO] Pushing FE image with tag: $tag..."
docker compose -f docker-compose-dev.yml build fe-sbt
2024-01-11 10:38:12 +00:00
docker tag sidp/cope2n-fe-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:${tag}
# docker tag sidp/cope2n-fe-fi-sbt:latest public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:production
docker push public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:${tag}
# docker push public.ecr.aws/sdsrv/sidp/cope2n-fe-fi-sbt:production
2023-12-21 05:55:14 +00:00
2023-12-25 07:14:05 +00:00
cp ./docker-compose-prod.yml ./docker-compose_${tag}.yml
2023-12-21 05:55:14 +00:00
sed -i "s/{{tag}}/$tag/g" ./docker-compose_${tag}.yml
2024-01-02 05:39:10 +00:00
cp .env_prod .env_${tag}