Skip to content

Commit

Permalink
Update prod_deploy.sh
Browse files Browse the repository at this point in the history
Signed-off-by: Ravencodess <[email protected]>
  • Loading branch information
Ravencodess authored Jul 29, 2024
1 parent ccee976 commit ce909be
Showing 1 changed file with 5 additions and 19 deletions.
24 changes: 5 additions & 19 deletions scripts/prod_deploy.sh
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

0 comments on commit ce909be

Please sign in to comment.