35 lines
1.9 KiB
Bash
Executable File
35 lines
1.9 KiB
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
tag=$1
|
|
is_prod=${$2:-False}
|
|
|
|
echo "[INFO] Tag received from Python: $tag"
|
|
|
|
# echo "[INFO] Updating everything the remote..."
|
|
# git submodule update --recursive --remote
|
|
|
|
echo "[INFO] Pushing AI image with tag: $tag..."
|
|
docker compose -f docker-compose-dev.yml build cope2n-fi-sbt
|
|
docker tag sidp/cope2n-ai-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:${tag}
|
|
docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:${tag}
|
|
# docker tag sidp/cope2n-ai-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:production
|
|
# docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-ai-fi-sbt:production
|
|
|
|
echo "[INFO] Pushing BE image with tag: $tag..."
|
|
docker compose -f docker-compose-dev.yml build be-ctel-sbt
|
|
docker tag sidp/cope2n-be-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:${tag}
|
|
# docker tag sidp/cope2n-be-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:production
|
|
docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:${tag}
|
|
# docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-be-fi-sbt:production
|
|
|
|
echo "[INFO] Pushing FE image with tag: $tag..."
|
|
docker compose -f docker-compose-dev.yml build fe-sbt
|
|
docker tag sidp/cope2n-fe-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:${tag}
|
|
# docker tag sidp/cope2n-fe-fi-sbt:latest 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:production
|
|
docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:${tag}
|
|
# docker push 756281617842.dkr.ecr.ap-southeast-1.amazonaws.com/sidp/cope2n-fe-fi-sbt:production
|
|
|
|
cp ./docker-compose-prod.yml ./docker-compose_${tag}.yml
|
|
sed -i "s/{{tag}}/$tag/g" ./docker-compose_${tag}.yml
|
|
cp .env_prod .env_${tag} |