-
Notifications
You must be signed in to change notification settings - Fork 265
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #725 from hngprojects/Ravencodess-patch-1
optimized staging and production deploy scripts to use docker hub and added a build and push job to staging and prod workflow
- Loading branch information
Showing
6 changed files
with
74 additions
and
50 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
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
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
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
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 |
---|---|---|
@@ -1,22 +1,8 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 {next|remix}" | ||
exit 1 | ||
fi | ||
set -e | ||
|
||
if [ "$1" == "next" ]; then | ||
cd /home/nextjs/prod/hng_boilerplate_nextjs | ||
git pull origin main | ||
docker compose -f docker/prod/docker-compose.yml build | ||
docker compose -f docker/prod/docker-compose.yml up -d | ||
elif [ "$1" == "remix" ]; then | ||
cd /home/remixjs/prod/hng_boilerplate_remix | ||
git pull origin main | ||
docker compose -f docker/prod/docker-compose.yml build | ||
docker compose -f docker/prod/docker-compose.yml up -d | ||
else | ||
echo "Invalid argument. Use 'next' or 'remix'." | ||
echo "Usage: $0 {next|remix}" | ||
exit 1 | ||
fi | ||
cd "$(git rev-parse --show-toplevel)" | ||
git pull origin main | ||
docker pull hngdevops/nextjs-boilerplate:prod | ||
docker compose --project-name prod-nextjs -f docker/prod/docker-compose.yml up -d |
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 |
---|---|---|
@@ -1,22 +1,8 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: $0 {next|remix}" | ||
exit 1 | ||
fi | ||
set -e | ||
|
||
if [ "$1" == "next" ]; then | ||
cd /home/nextjs/staging/hng_boilerplate_nextjs | ||
git pull origin staging | ||
docker compose -f docker/staging/docker-compose.yml build | ||
docker compose -f docker/staging/docker-compose.yml up -d | ||
elif [ "$1" == "remix" ]; then | ||
cd /home/remixjs/staging/hng_boilerplate_remix | ||
git pull origin staging | ||
docker compose -f docker/staging/docker-compose.yml build | ||
docker compose -f docker/staging/docker-compose.yml up -d | ||
else | ||
echo "Invalid argument. Use 'next' or 'remix'." | ||
echo "Usage: $0 {next|remix}" | ||
exit 1 | ||
fi | ||
cd "$(git rev-parse --show-toplevel)" | ||
git pull origin staging | ||
docker pull hngdevops/nextjs-boilerplate:staging | ||
docker compose --project-name staging-nextjs -f docker/staging/docker-compose.yml up -d |