Improve docker compose (#8637)

Add a proxy script to use the right install.sh branch/version matching
the docker-compose

Also stop exposing redis publicly as it's not necessary
This commit is contained in:
Félix Malfait 2024-11-21 11:51:42 +01:00 committed by GitHub
parent 24dbabcad7
commit 9cb076d9e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 13 additions and 3 deletions

View File

@ -90,8 +90,6 @@ services:
redis: redis:
image: redis image: redis
ports:
- "6379:6379"
restart: always restart: always
volumes: volumes:

View File

@ -0,0 +1,12 @@
pull_version=${VERSION:-$(curl -s https://api.github.com/repos/twentyhq/twenty/releases/latest | grep '"tag_name":' | cut -d '"' -f 4)}
pull_branch=${BRANCH:-$pull_version}
version_num=${pull_version#v}
target_version="0.32.4"
# We moved the install script to a different location in v0.32.4
if [[ -n "$BRANCH" ]] || [[ "$(printf '%s\n' "$target_version" "$version_num" | sort -V | head -n1)" != "$version_num" ]]; then
curl -sL "https://raw.githubusercontent.com/twentyhq/twenty/$pull_branch/packages/twenty-docker/scripts/install.sh" | bash -s -- "$VERSION" "$BRANCH"
else
curl -sL "https://raw.githubusercontent.com/twentyhq/twenty/$pull_branch/install.sh" | bash -s -- "$VERSION" "$BRANCH"
fi

View File

@ -31,7 +31,7 @@ bash <(curl -sL https://git.new/20)
To install a specific version or branch: To install a specific version or branch:
```bash ```bash
VERSION=x.y.z BRANCH=branch-name bash <(curl -sL https://git.new/20) VERSION=vx.y.z BRANCH=branch-name bash <(curl -sL https://git.new/20)
``` ```
- Replace x.y.z with the desired version number. - Replace x.y.z with the desired version number.
- Replace branch-name with the name of the branch you want to install. - Replace branch-name with the name of the branch you want to install.