Compare commits

...

19 commits

Author SHA1 Message Date
danilapog ee8ca935cf Remove script argument 2022-07-11 18:36:07 +03:00
danilapog 65329cbd8b Refactoring code 2022-07-11 17:18:53 +03:00
danilapog cc89c6d299 Fix ^M after sed 2022-07-11 17:18:06 +03:00
danilapog 9755dff742 Fix folder path 2022-07-11 12:52:41 +03:00
danilapog 2fc44ecd72 Add reusable ability 2022-07-11 12:51:18 +03:00
danilapog 4b9144d8fb Update variable description 2022-07-06 13:04:22 +03:00
danilapog cfc1529fc2 Update variable description 2022-07-06 12:19:43 +03:00
danilapog ce750bb68a Refactoring variable desctiption 2022-07-06 12:11:20 +03:00
danilapog cf951c0785 Refactoring variable description 2022-07-05 17:57:59 +03:00
danilapog 108b88ee25 Refactoring variable description 2022-07-05 17:52:35 +03:00
danilapog 4b55ce9b68 Refactoring description 2022-07-05 17:50:32 +03:00
danilapog 9d028310c4 Cosmetic changes 2022-07-05 17:08:08 +03:00
danilapog cf4b4761ed Add variable description 2022-07-05 17:01:45 +03:00
danilapog fcba4b875b Add variable description 2022-07-05 16:41:45 +03:00
danilapog 04f939c276 Cosmetic changes 2022-07-05 16:34:32 +03:00
danilapog 7dc49475fb Change function name 2022-07-05 16:29:06 +03:00
danilapog 704d695272 Fix variable name 2022-07-05 16:18:24 +03:00
danilapog 56ef144c16 Refactoring local openssl function line 2022-07-04 12:17:38 +03:00
danilapog 7f9253f1c7 Add variables for ssl in local networks 2022-06-16 19:05:33 +03:00
2 changed files with 18 additions and 0 deletions

View file

@ -201,6 +201,7 @@ Below is the complete list of parameters that can be set using environment varia
- **METRICS_PREFIX**: Defines StatsD metrics prefix for backend services. Defaults to `ds.`. - **METRICS_PREFIX**: Defines StatsD metrics prefix for backend services. Defaults to `ds.`.
- **LETS_ENCRYPT_DOMAIN**: Defines the domain for Let's Encrypt certificate. - **LETS_ENCRYPT_DOMAIN**: Defines the domain for Let's Encrypt certificate.
- **LETS_ENCRYPT_MAIL**: Defines the domain administator mail address for Let's Encrypt certificate. - **LETS_ENCRYPT_MAIL**: Defines the domain administator mail address for Let's Encrypt certificate.
- **NODE_OPTIONS**: Define the variables to start NodeJs processes like docservice and converter. Allows command line arguments to be provided through an environment variable. [All avalivable arguments](https://nodejs.org/api/cli.html#node_optionsoptions).
## Installing ONLYOFFICE Document Server integrated with Community and Mail Servers ## Installing ONLYOFFICE Document Server integrated with Community and Mail Servers

View file

@ -18,6 +18,7 @@ DS_LOG_DIR="${LOG_DIR}/documentserver"
LIB_DIR="/var/lib/${COMPANY_NAME}" LIB_DIR="/var/lib/${COMPANY_NAME}"
DS_LIB_DIR="${LIB_DIR}/documentserver" DS_LIB_DIR="${LIB_DIR}/documentserver"
CONF_DIR="/etc/${COMPANY_NAME}/documentserver" CONF_DIR="/etc/${COMPANY_NAME}/documentserver"
SUPERVISOR_CONF_DIR="/etc/supervisor/conf.d"
IS_UPGRADE="false" IS_UPGRADE="false"
ONLYOFFICE_DATA_CONTAINER=${ONLYOFFICE_DATA_CONTAINER:-false} ONLYOFFICE_DATA_CONTAINER=${ONLYOFFICE_DATA_CONTAINER:-false}
@ -166,6 +167,20 @@ deprecated_var() {
fi fi
} }
update_supervisor_config() {
if [[ -n ${NODE_OPTIONS} ]]; then
RESULT=$(cat ${SUPERVISOR_CONF_DIR}/ds-converter.conf | grep -e 'NODE_OPTIONS')
if [[ -z ${RESULT} ]]; then
for file in ${SUPERVISOR_CONF_DIR}/ds-converter.conf ${SUPERVISOR_CONF_DIR}/ds-docservice.conf
do
sed -i "s|environment.*|&\,NODE_OPTIONS=${NODE_OPTIONS}|g" $file &> /dev/null
sed -i 's/\r//g' $file &> /dev/null
done
fi
fi
}
parse_rabbitmq_url(){ parse_rabbitmq_url(){
local amqp=$1 local amqp=$1
@ -524,6 +539,8 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
update_ds_settings update_ds_settings
update_supervisor_config
# update settings by env variables # update settings by env variables
if [ $DB_HOST != "localhost" ]; then if [ $DB_HOST != "localhost" ]; then
update_db_settings update_db_settings