File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 3232# ./gen-rel-notes.sh > CHANGELOG
3333
3434 - name : Build and push
35- run : |
36- cp tdei_uw.env .env
37- echo "CODE_VERSION=${CODE_VERSION}" >> .env
38- docker buildx bake --file docker-compose.build.yml --push
35+ run : docker compose -f docker-compose.build.yml --env-file tdei_uw.env build --build-arg CODE_VERSION=${CODE_VERSION}
3936 env :
4037 ENV : ${{ vars.ENV }}
4138 WS_DOCKER_REGISTRY : ${{ vars.WS_DOCKER_REGISTRY }}
8178 docker context create dev --docker "host=ssh://github-actions@${{ vars.AZURE_DOCKER_HOST_IP }}"
8279 docker context use dev
8380
81+ # stop all running images, remove the containers, remove the images
82+ # why? in case we're rebuilding the image of the same commit, we want to ensure the newer image is deployed
83+ # in case the last one was corrupted for some reason--just to avoid any questions about deployment reliability
84+ docker stop $(docker ps -q)
85+ docker rm -v $(docker ps --filter status=exited -q)
86+ docker rmi $(docker images -q)
87+
8488 # remove images no longer in use--may need disk space to pull
85- docker image prune -a -f
89+ # docker image prune -a -f
8690
8791 # pull new images, recreate containers
8892 docker compose -f docker-compose.deploy.yml --env-file tdei_uw.env up -d --force-recreate --remove-orphans
You can’t perform that action at this time.
0 commit comments