fix(docker): properly replace api url

(cherry picked from commit 587f2edd83)
This commit is contained in:
kolaente 2021-10-04 20:55:05 +02:00
parent c7c3ef79be
commit 591441ae20
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

3
run.sh
View file

@ -9,7 +9,8 @@ fi
# Escape the variable to prevent sed from complaining # Escape the variable to prevent sed from complaining
VIKUNJA_API_URL=$(echo $VIKUNJA_API_URL |sed 's/\//\\\//g') VIKUNJA_API_URL=$(echo $VIKUNJA_API_URL |sed 's/\//\\\//g')
sed -i "s/http\:\/\/localhost\:3456\/api\/v1/$VIKUNJA_API_URL/g" /usr/share/nginx/html/index.html sed -i "s/http\:\/\/localhost\:3456//g" /usr/share/nginx/html/index.html # replacing in two steps to make sure api urls from releases are properly replaced as well
sed -i "s/'\/api\/v1/'$VIKUNJA_API_URL/g" /usr/share/nginx/html/index.html
# Set the uid and gid of the nginx run user # Set the uid and gid of the nginx run user
usermod --non-unique --uid ${PUID} nginx usermod --non-unique --uid ${PUID} nginx