Evgeniy Antonyuk
fde212c05c
* Migration to opensearch * Implement indexes update on version change * Add opensearch-dashboard and logstash to retrieve docker logs * Replace logstash with fluent-bit to retrieve docker logs * Add running fluent-bit logging to OCI * Change fluent-bit supply to package delivery * Implement index cleanup every 30 days via lua script * Implement index cleanup via exec on timer * Optimize indexes update on version change * Add a check that fluent-bit has installed successfully * Add the dashboard location and authorization for it * Move dashboards location to router * Migration to opensearch in docspace.profiles.yml * Replace the naming with dashboards * Add password generation for /dashboards/
13 lines
833 B
Bash
Executable File
13 lines
833 B
Bash
Executable File
#!/bin/bash
|
|
WRONG_PORTAL_NAME_URL=${WRONG_PORTAL_NAME_URL:-""}
|
|
REDIS_HOST=${REDIS_HOST:-"${REDIS_CONTAINER_NAME}"}
|
|
REDIS_PORT=${REDIS_PORT:-"6379"}
|
|
REDIS_PASSWORD=${REDIS_PASSWORD:-""}
|
|
|
|
envsubst '$MAP_HASH_BUCKET_SIZE,$COUNT_WORKER_CONNECTIONS' < /etc/nginx/nginx.conf.template > /usr/local/openresty/nginx/conf/nginx.conf
|
|
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
|
|
sed -i "s~\(redis_pass =\).*~\1 \"$REDIS_PASSWORD\"~" /etc/nginx/conf.d/onlyoffice.conf
|
|
sed -i "s~\(\"wrongPortalNameUrl\":\).*,~\1 \"${WRONG_PORTAL_NAME_URL}\",~g" /var/www/public/scripts/config.json
|
|
echo "${DASHBOARDS_USERNAME:-onlyoffice}:$(openssl passwd -6 -stdin <<< "${DASHBOARDS_PASSWORD:-onlyoffice}")" > /etc/nginx/.htpasswd_dashboards
|