DocSpace-buildtools/build/install/docker/prepare-nginx-router.sh

8 lines
376 B
Bash
Raw Normal View History

#!/bin/sh
2023-08-29 09:20:16 +00:00
REDIS_HOST=${REDIS_HOST:-"${REDIS_CONTAINER_NAME}"}
REDIS_PORT=${REDIS_PORT:-"6379"}
2022-11-22 08:49:58 +00:00
envsubst '$MAP_HASH_BUCKET_SIZE,$COUNT_WORKER_CONNECTIONS' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf
2023-08-29 09:20:16 +00:00
sed -i "s~\(redis_host =\).*~\1 \"$REDIS_HOST\"~" /etc/nginx/conf.d/onlyoffice.conf
sed -i "s~\(redis_port =\).*~\1 $REDIS_PORT~" /etc/nginx/conf.d/onlyoffice.conf