Skip to content

Commit

Permalink
Merge pull request #714 from hngprojects/destinedcodes-patch-1
Browse files Browse the repository at this point in the history
Update docker-compose.yml
  • Loading branch information
ThePrimeJnr authored Jul 29, 2024
2 parents cfe9695 + 77b8d73 commit eab07a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
4 changes: 2 additions & 2 deletions docker/team-deploy/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ services:
image: hngdevops/nextjs-boilerplate:dev
ports:
- "${PORT}:3000"
env_file:
- ../../.env
volumes:
- ../../.env:/app/.env
11 changes: 2 additions & 9 deletions scripts/team_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,16 @@
set -e

# Check if the team name is provided
if [ -z "$1" ]; then
echo "Error: Team name is required."
echo "Usage: $0 [team name] [port]"
exit 1
fi

# Check if the port is provided
if [ -z "$2" ]; then
if [ -z "$1" ] || [ -z "$2" ]; then
echo "Error: Port number is required."
echo "Usage: $0 [team name] [port]"
exit 1
fi

# Assign arguments to variables for clarity
TEAM_NAME=$1
export PORT=$2

cd "$(git rev-parse --show-toplevel)"
git pull origin dev
docker pull hngdevops/nextjs-boilerplate:dev
docker compose --project-name $TEAM_NAME -f docker/team-deploy/docker-compose.yml up -d

0 comments on commit eab07a7

Please sign in to comment.