next try of replacement logic for federation locations

This commit is contained in:
Claus-Peter Hübner 2023-03-01 23:41:34 +01:00
parent 211c8f07c0
commit af5cf0f585
3 changed files with 4 additions and 4 deletions

View File

@ -113,7 +113,7 @@ server {
}
# Federation
FEDERATION_NGINX_CONF
$FEDERATION_NGINX_CONF
# TODO this could be a performance optimization
#location /vue {

View File

@ -99,7 +99,7 @@ server {
}
# Federation
FEDERATION_NGINX_CONF
$FEDERATION_NGINX_CONF
# TODO this could be a performance optimization
#location /vue {

View File

@ -88,7 +88,7 @@ do
FEDERATION_PORT=$(($FEDERATION_PORT + $port))
export FEDERATION_PORT
echo " create ngingx config: location /api/$FEDERATION_APIVERSION to http://127.0.0.1:$FEDERATION_PORT"
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/gradido-federation.conf.template >> $NGINX_CONFIG_DIR/gradido-federation.conf
envsubst "$(env | sed -e 's/\$FEDERATION_APIVERSION\|\$FEDERATION_PORT//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/gradido-federation.conf.template >> $NGINX_CONFIG_DIR/gradido-federation.conf
done
echo "===================================================================================================="
@ -101,7 +101,7 @@ case "$NGINX_SSL" in
true) TEMPLATE_FILE="gradido.conf.ssl.template" ;;
*) TEMPLATE_FILE="gradido.conf.template" ;;
esac
envsubst "$(env | sed -e 's/FEDERATION_NGINX_CONF/\$FEDERATION_NGINX_CONF/g')" < $NGINX_CONFIG_DIR/$TEMPLATE_FILE > $NGINX_CONFIG_DIR/gradido.conf.tmp
envsubst "$(env | sed -e 's/\$FEDERATION_NGINX_CONF//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/$TEMPLATE_FILE > $NGINX_CONFIG_DIR/gradido.conf.tmp
envsubst "$(env | sed -e 's/=.*//' -e 's/^/\$/g')" < $NGINX_CONFIG_DIR/gradido.conf.tmp > $NGINX_CONFIG_DIR/gradido.conf
# rm $NGINX_CONFIG_DIR/gradido-federation.conf