-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into fix-hanging-requests-cognito
- Loading branch information
Showing
1 changed file
with
9 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -126,11 +126,16 @@ jobs: | |
echo "Pulling Docker image..." | ||
docker pull ${{ secrets.AWS_ECR_REPOSITORY }}:latest | ||
echo "Stopping current Docker container..." | ||
docker ps -q --filter ancestor=${{ secrets.AWS_ECR_REPOSITORY }}:latest | xargs -r docker stop | ||
echo "Stopping any existing container using port 8080..." | ||
docker ps --filter "ancestor=${{ secrets.AWS_ECR_REPOSITORY }}:latest" --format "{{.ID}}" | xargs -r docker stop | ||
docker ps --filter "publish=8080" --format "{{.ID}}" | xargs -r docker stop | ||
echo "Removing any existing container using port 8080..." | ||
docker ps -a --filter "ancestor=${{ secrets.AWS_ECR_REPOSITORY }}:latest" --format "{{.ID}}" | xargs -r docker rm | ||
docker ps -a --filter "publish=8080" --format "{{.ID}}" | xargs -r docker rm | ||
echo "Starting new Docker container..." | ||
docker run -d -p 8080:8080 --env-file /path/to/.env ${{ secrets.AWS_ECR_REPOSITORY }}:latest | ||
docker run -d -p 8080:8080 --env-file .env ${{ secrets.AWS_ECR_REPOSITORY }}:latest | ||
- name: Confirm server is up | ||
uses: appleboy/[email protected] | ||
|
@@ -142,7 +147,7 @@ jobs: | |
echo "Waiting for server to start..." | ||
sleep 30 # Adjust sleep time as needed | ||
echo "Checking server status..." | ||
if curl -s --head --request GET http://localhost:8080 | grep "200 OK" > /dev/null; then | ||
if curl -s --head --request GET http://localhost:8080/flowsheet | grep "200 OK" > /dev/null; then | ||
echo "Server is up and running." | ||
else | ||
echo "Server is not running. Deployment failed." >&2 | ||
|