diff --git a/scripts/dev_deploy.sh b/scripts/dev_deploy.sh index 829383e3d..2e7f92f3c 100755 --- a/scripts/dev_deploy.sh +++ b/scripts/dev_deploy.sh @@ -1,23 +1,8 @@ #!/bin/bash -if [ "$#" -ne 1 ]; then - echo "Usage: $0 {next|remix}" - exit 1 -fi - -if [ "$1" == "next" ]; then - cd /home/nextjs/dev/hng_boilerplate_nextjs - git pull origin dev - docker compose -f docker/development/docker-compose.yml build - docker compose -f docker/development/docker-compose.yml up -d -elif [ "$1" == "remix" ]; then - cd /home/remixjs/dev/hng_boilerplate_remix - git pull origin dev - docker compose -f docker/development/docker-compose.yml build - docker compose -f docker/development/docker-compose.yml up -d -else - echo "Invalid argument. Use 'next' or 'remix'." - echo "Usage: $0 {next|remix}" - exit 1 -fi +set -e +cd "$(git rev-parse --show-toplevel)" +git pull origin dev +docker pull hngdevops/nextjs-boilerplate:dev +docker compose --project-name dev-nextjs -f docker/development/docker-compose.yml up -d