Skip to content

Commit

Permalink
Update install.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
yadavshubham01 authored Oct 22, 2024
1 parent 113e9fc commit 74fff03
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,20 +72,18 @@ done
echo "📁 Creating directory '$dir_name'"
mkdir -p "$dir_name" && cd "$dir_name" || { echo "❌ Failed to create/access directory '$dir_name'"; exit 1; }

# Copy the twenty/packages/twenty-docker/docker-compose.yml file in it
# Fetch docker-compose.yml from the branch corresponding to the version or main
echo -e "\t• Copying docker-compose.yml"
curl -sLo docker-compose.yml https://raw.githubusercontent.com/twentyhq/twenty/$branch/packages/twenty-docker/docker-compose.yml
curl -sLo docker-compose.yml https://raw.githubusercontent.com/twentyhq/twenty/$version/packages/twenty-docker/docker-compose.yml

# Copy twenty/packages/twenty-docker/.env.example to .env
# Set REDIS_URL or REDIS_HOST depending on the version
echo -e "\t• Setting up .env file"
curl -sLo .env https://raw.githubusercontent.com/twentyhq/twenty/$branch/packages/twenty-docker/.env.example
curl -sLo .env https://raw.githubusercontent.com/twentyhq/twenty/$version/packages/twenty-docker/.env.example

# Replace TAG=latest by TAG=<latest_release or version input>
if [[ $(uname) == "Darwin" ]]; then
# Running on macOS
sed -i '' "s/TAG=latest/TAG=$version/g" .env
else
# Assuming Linux
sed -i'' "s/TAG=latest/TAG=$version/g" .env
fi

Expand Down

0 comments on commit 74fff03

Please sign in to comment.