Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove containers for job2 and job3, rename job1 to job #138

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 5 additions & 19 deletions .github/workflows/main-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ jobs:
## Update each backend service one by one
## First Deployment
docker compose down qacc-be-graph-ql1
docker compose down qacc-be-job1
docker compose down qacc-be-job
docker compose up --force-recreate -d qacc-be-graph-ql1
docker compose up --force-recreate -d qacc-be-job1
docker compose up --force-recreate -d qacc-be-job

# Wait for qacc-be-graph-ql1 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql1 to become healthy..."
Expand All @@ -196,9 +196,9 @@ jobs:
echo "qacc-be-graph-ql1 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job1 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job1)" != "\"running\"" ]; then
echo "qacc-be-job1 is not running, stopping deployment"
# Check if qacc-be-job is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job)" != "\"running\"" ]; then
echo "qacc-be-job is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
Expand All @@ -218,9 +218,7 @@ jobs:
cd QAcc-BE
## Second Deployment
docker compose down qacc-be-graph-ql2
docker compose down qacc-be-job2
docker compose up --force-recreate -d qacc-be-graph-ql2
docker compose up --force-recreate -d qacc-be-job2

# Wait for qacc-be-graph-ql2 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql2 to become healthy..."
Expand All @@ -234,11 +232,6 @@ jobs:
echo "qacc-be-graph-ql2 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job2 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job2)" != "\"running\"" ]; then
echo "qacc-be-job2 is not running, stopping deployment"
exit 1
fi
echo "Second deployment phase completed successfully"

rollout-deploy-3:
Expand All @@ -256,9 +249,7 @@ jobs:
cd QAcc-BE
## Third Deployment
docker compose down qacc-be-graph-ql3
docker compose down qacc-be-job3
docker compose up --force-recreate -d qacc-be-graph-ql3
docker compose up --force-recreate -d qacc-be-job3

# Wait for qacc-be-graph-ql3 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql3 to become healthy..."
Expand All @@ -272,9 +263,4 @@ jobs:
echo "qacc-be-graph-ql3 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job3 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job3)" != "\"running\"" ]; then
echo "qacc-be-job3 is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
24 changes: 5 additions & 19 deletions .github/workflows/staging-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ jobs:
## Update each backend service one by one
## First Deployment
docker compose down qacc-be-graph-ql1
docker compose down qacc-be-job1
docker compose down qacc-be-job
docker compose up --force-recreate -d qacc-be-graph-ql1
docker compose up --force-recreate -d qacc-be-job1
docker compose up --force-recreate -d qacc-be-job

# Wait for qacc-be-graph-ql1 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql1 to become healthy..."
Expand All @@ -196,9 +196,9 @@ jobs:
echo "qacc-be-graph-ql1 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job1 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job1)" != "\"running\"" ]; then
echo "qacc-be-job1 is not running, stopping deployment"
# Check if qacc-be-job is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job)" != "\"running\"" ]; then
echo "qacc-be-job is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
Expand All @@ -218,9 +218,7 @@ jobs:
cd QAcc-BE
## Second Deployment
docker compose down qacc-be-graph-ql2
docker compose down qacc-be-job2
docker compose up --force-recreate -d qacc-be-graph-ql2
docker compose up --force-recreate -d qacc-be-job2

# Wait for qacc-be-graph-ql2 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql2 to become healthy..."
Expand All @@ -234,11 +232,6 @@ jobs:
echo "qacc-be-graph-ql2 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job2 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job2)" != "\"running\"" ]; then
echo "qacc-be-job2 is not running, stopping deployment"
exit 1
fi
echo "Second deployment phase completed successfully"

rollout-deploy-3:
Expand All @@ -256,9 +249,7 @@ jobs:
cd QAcc-BE
## Third Deployment
docker compose down qacc-be-graph-ql3
docker compose down qacc-be-job3
docker compose up --force-recreate -d qacc-be-graph-ql3
docker compose up --force-recreate -d qacc-be-job3

# Wait for qacc-be-graph-ql3 to be healthy (timeout after 5 minutes)
echo "Waiting for qacc-be-graph-ql3 to become healthy..."
Expand All @@ -272,9 +263,4 @@ jobs:
echo "qacc-be-graph-ql3 is not healthy, stopping deployment"
exit 1
fi
# Check if qacc-be-job3 is running
if [ "$(docker inspect --format='{{json .State.Status}}' qacc-be-job3)" != "\"running\"" ]; then
echo "qacc-be-job3 is not running, stopping deployment"
exit 1
fi
echo "First deployment phase completed successfully"
34 changes: 1 addition & 33 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ services:
ports:
- '4003:4000'

qacc-be-job1:
qacc-be-job:
container_name: qacc-be-job1
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
Expand All @@ -93,38 +93,6 @@ services:
networks:
- qacc

qacc-be-job2:
container_name: qacc-be-job2
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- JOB_MODE=true
restart: always
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs-job:/usr/src/app/logs
networks:
- qacc

qacc-be-job3:
container_name: qacc-be-job3
image: ${DOCKER_IMAGE}
command: npm run start:docker:server
environment:
- ENVIRONMENT=production
- LOG_PATH=/usr/src/app/logs/qacc.log
- JOB_MODE=true
restart: always
volumes:
- ./config:/usr/src/app/config
- ./config:/usr/src/app/build/config
- ./logs-job:/usr/src/app/logs
networks:
- qacc

qacc-redis:
container_name: qacc-redis
image: redis:7-alpine
Expand Down
Loading