fix(one-liner): update SERVER_URL when not using default port (#7026)

Small fix that should resolve #6341 by replacing the port of SERVER_URL
in the generated .env file
This commit is contained in:
Quentin G. 2024-09-14 11:05:43 +02:00 committed by GitHub
parent d1871a4a64
commit 3a3262f003
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,8 +112,10 @@ if command -v nc &> /dev/null; then
read -p "Enter a new port number: " new_port
if [[ $(uname) == "Darwin" ]]; then
sed -i '' "s/$port:$port/$new_port:$port/g" docker-compose.yml
sed -E -i '' "s|^SERVER_URL=http://localhost:[0-9]+|SERVER_URL=http://localhost:$new_port|g" .env
else
sed -i'' "s/$port:$port/$new_port:$port/g" docker-compose.yml
sed -E -i'' "s|^SERVER_URL=http://localhost:[0-9]+|SERVER_URL=http://localhost:$new_port|g" .env
fi
port=$new_port
done