From f8180d13438430c05346d2d7236a0520b9988504 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Mon, 28 Jan 2019 15:47:32 +0300 Subject: [PATCH 01/11] Add amqp server params --- run-document-server.sh | 54 +++++++++++++++++++++++++++++++++--------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index d8585f7..a6f132e 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -62,7 +62,9 @@ read_setting(){ POSTGRESQL_SERVER_PASS=${POSTGRESQL_SERVER_PASS:-$(${JSON} services.CoAuthoring.sql.dbPass)} RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-$(${JSON} rabbitmq.url)} - parse_rabbitmq_url + AMQP_SERVER_URL=${AMQP_SERVER_URL:-${RABBITMQ_SERVER_URL}} + AMQP_SERVER_ENGINE=${AMQP_SERVER_ENGINE:-rabbitmq} + parse_rabbitmq_url ${AMQP_SERVER_URL} REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)} REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379} @@ -71,7 +73,7 @@ read_setting(){ } parse_rabbitmq_url(){ - local amqp=${RABBITMQ_SERVER_URL} + local amqp=$1 # extract the protocol local proto="$(echo $amqp | grep :// | sed -e's,^\(.*://\).*,\1,g')" @@ -105,10 +107,10 @@ parse_rabbitmq_url(){ # extract the path (if any) local path="$(echo $url | grep / | cut -d/ -f2-)" - RABBITMQ_SERVER_HOST=$host - RABBITMQ_SERVER_USER=$user - RABBITMQ_SERVER_PASS=$pass - RABBITMQ_SERVER_PORT=$port + AMQP_SERVER_HOST=$host + AMQP_SERVER_USER=$user + AMQP_SERVER_PASS=$pass + AMQP_SERVER_PORT=$port } waiting_for_connection(){ @@ -122,8 +124,8 @@ waiting_for_postgresql(){ waiting_for_connection ${POSTGRESQL_SERVER_HOST} ${POSTGRESQL_SERVER_PORT} } -waiting_for_rabbitmq(){ - waiting_for_connection ${RABBITMQ_SERVER_HOST} ${RABBITMQ_SERVER_PORT} +waiting_for_amqp(){ + waiting_for_connection ${AMQP_SERVER_HOST} ${AMQP_SERVER_PORT} } waiting_for_redis(){ @@ -141,7 +143,37 @@ update_postgresql_settings(){ } update_rabbitmq_setting(){ - ${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'" + if [ "${AMQP_SERVER_ENGINE}" == "rabbitmq" ]; then + ${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'" + sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1true\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js + fi + + if [ "${AMQP_SERVER_ENGINE}" == "activemq" ]; then + ${JSON} -I -e "if(this.activemq===undefined)this.activemq={};" + ${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};" + + ${JSON} -I -e "this.activemq.connectOptions.host = '${AMQP_SERVER_HOST}'" + + if [ ! "${AMQP_SERVER_PORT}" == "" ]; then + ${JSON} -I -e "this.activemq.connectOptions.port = '${AMQP_SERVER_PORT}'" + else + ${JSON} -I -e "delete this.activemq.connectOptions.port" + fi + + if [ ! "${AMQP_SERVER_USER}" == "" ]; then + ${JSON} -I -e "this.activemq.connectOptions.username = '${AMQP_SERVER_USER}'" + else + ${JSON} -I -e "delete this.activemq.connectOptions.username" + fi + + if [ ! "${AMQP_SERVER_PASS}" == "" ]; then + ${JSON} -I -e "this.activemq.connectOptions.password = '${AMQP_SERVER_PASS}'" + else + ${JSON} -I -e "delete this.activemq.connectOptions.password" + fi + + sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1false\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js + fi } update_redis_settings(){ @@ -302,7 +334,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then LOCAL_SERVICES+=("postgresql") fi - if [ ${RABBITMQ_SERVER_HOST} != "localhost" ]; then + if [ ${AMQP_SERVER_HOST} != "localhost" ]; then update_rabbitmq_setting else LOCAL_SERVICES+=("rabbitmq-server") @@ -336,7 +368,7 @@ fi if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then waiting_for_postgresql - waiting_for_rabbitmq + waiting_for_amqp waiting_for_redis update_nginx_settings From 45ce3d40ab08923f6a87453aac69a9b72af7895e Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Thu, 14 Feb 2019 13:03:31 +0300 Subject: [PATCH 02/11] Add activemq sample --- activemq.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 activemq.yml diff --git a/activemq.yml b/activemq.yml new file mode 100644 index 0000000..4f39e77 --- /dev/null +++ b/activemq.yml @@ -0,0 +1,31 @@ +version: '2' +services: + onlyoffice-documentserver: + container_name: onlyoffice-documentserver + image: onlyoffice/4testing-documentserver-ie:latest + environment: + - AMQP_SERVER_URL=amqp://guest:guest@onlyoffice-activemq + - AMQP_SERVER_ENGINE=activemq + stdin_open: true + restart: always + ports: + - '80:80' + - '443:443' + networks: + - onlyoffice + + onlyoffice-activemq: + container_name: onlyoffice-activemq + image: webcenter/activemq:5.14.3 + environment: + - ACTIVEMQ_USERS_guest=guest + - ACTIVEMQ_GROUPS_owners=guest + restart: always + networks: + - onlyoffice + expose: + - '5672' + +networks: + onlyoffice: + driver: 'bridge' From 364240345718a48e9b87857b9f7f4ed4b9fb2ade Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 16 Oct 2018 12:22:18 +0300 Subject: [PATCH 03/11] Rebranding config file name --- run-document-server.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index a6f132e..6caf351 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -26,9 +26,9 @@ SYSCONF_TEMPLATES_DIR="/app/onlyoffice/setup/config" NGINX_CONFD_PATH="/etc/nginx/conf.d"; NGINX_ONLYOFFICE_PATH="${CONF_DIR}/nginx" -NGINX_ONLYOFFICE_CONF="${NGINX_ONLYOFFICE_PATH}/onlyoffice-documentserver.conf" +NGINX_ONLYOFFICE_CONF="${NGINX_ONLYOFFICE_PATH}/ds.conf" NGINX_ONLYOFFICE_EXAMPLE_PATH="${CONF_DIR}-example/nginx" -NGINX_ONLYOFFICE_EXAMPLE_CONF="${NGINX_ONLYOFFICE_EXAMPLE_PATH}/includes/onlyoffice-documentserver-example.conf" +NGINX_ONLYOFFICE_EXAMPLE_CONF="${NGINX_ONLYOFFICE_EXAMPLE_PATH}/includes/ds-example.conf" NGINX_CONFIG_PATH="/etc/nginx/nginx.conf" NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1} @@ -244,7 +244,7 @@ update_nginx_settings(){ # setup HTTPS if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then - cp -f ${NGINX_ONLYOFFICE_PATH}/onlyoffice-documentserver-ssl.conf.template ${NGINX_ONLYOFFICE_CONF} + cp -f ${NGINX_ONLYOFFICE_PATH}/ds-ssl.conf.tmpl ${NGINX_ONLYOFFICE_CONF} # configure nginx sed 's,{{SSL_CERTIFICATE_PATH}},'"${SSL_CERTIFICATE_PATH}"',' -i ${NGINX_ONLYOFFICE_CONF} @@ -272,7 +272,7 @@ update_nginx_settings(){ sed '/max-age=/d' -i ${NGINX_ONLYOFFICE_CONF} fi else - ln -sf ${NGINX_ONLYOFFICE_PATH}/onlyoffice-documentserver.conf.template ${NGINX_ONLYOFFICE_CONF} + ln -sf ${NGINX_ONLYOFFICE_PATH}/ds.conf.tmpl ${NGINX_ONLYOFFICE_CONF} fi if [ -f "${NGINX_ONLYOFFICE_EXAMPLE_CONF}" ]; then @@ -304,7 +304,7 @@ mkdir -p ${DS_LOG_DIR}-example # change folder rights for i in ${LOG_DIR} ${LIB_DIR} ${DATA_DIR}; do - chown -R onlyoffice:onlyoffice "$i" + chown -R ds:ds "$i" chmod -R 755 "$i" done From f0af6fe9712a08b1d983c03b45be3898eef0bbab Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Fri, 15 Feb 2019 15:10:19 +0300 Subject: [PATCH 04/11] Switch to local json --- run-document-server.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index 6caf351..11aa8f4 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -42,9 +42,10 @@ ONLYOFFICE_DEFAULT_CONFIG=${CONF_DIR}/local.json ONLYOFFICE_LOG4JS_CONFIG=${CONF_DIR}/log4js/production.json ONLYOFFICE_EXAMPLE_CONFIG=${CONF_DIR}-example/local.json -JSON="json -q -f ${ONLYOFFICE_DEFAULT_CONFIG}" -JSON_LOG="json -q -f ${ONLYOFFICE_LOG4JS_CONFIG}" -JSON_EXAMPLE="json -q -f ${ONLYOFFICE_EXAMPLE_CONFIG}" +JSON_BIN=${APP_DIR}/npm/node_modules/.bin/json +JSON="${JSON_BIN} -q -f ${ONLYOFFICE_DEFAULT_CONFIG}" +JSON_LOG="${JSON_BIN} -q -f ${ONLYOFFICE_LOG4JS_CONFIG}" +JSON_EXAMPLE="${JSON_BIN} -q -f ${ONLYOFFICE_EXAMPLE_CONFIG}" LOCAL_SERVICES=() From 88f33c5d8fda5bd9d6ef8c99494408928de324ea Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Thu, 14 Feb 2019 15:19:13 +0300 Subject: [PATCH 05/11] Add AMQP_ SERVER_ params descriptions --- README.md | 3 ++- docker-compose.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3d01edf..524ca68 100644 --- a/README.md +++ b/README.md @@ -167,7 +167,8 @@ Below is the complete list of parameters that can be set using environment varia - **POSTGRESQL_SERVER_DB_NAME**: The name of a PostgreSQL database to be created on the image startup. - **POSTGRESQL_SERVER_USER**: The new user name with superuser permissions for the PostgreSQL account. - **POSTGRESQL_SERVER_PASS**: The password set for the PostgreSQL account. -- **RABBITMQ_SERVER_URL**: The [AMQP URL](http://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to RabbitMQ server. +- **AMQP_SERVER_URL**: The [AMQP URL](http://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server. +- **AMQP_SERVER_ENGINE**: The message broker engine. Supported values are 'rabbitmq' or 'activemq'. Defaults to 'rabbitmq'. - **REDIS_SERVER_HOST**: The IP address or the name of the host where the Redis server is running. - **REDIS_SERVER_PORT**: The Redis server port number. - **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes. diff --git a/docker-compose.yml b/docker-compose.yml index 044093a..b170947 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -9,7 +9,7 @@ services: - POSTGRESQL_SERVER_PORT=5432 - POSTGRESQL_SERVER_DB_NAME=onlyoffice - POSTGRESQL_SERVER_USER=onlyoffice - - RABBITMQ_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq + - AMQP_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq - REDIS_SERVER_HOST=onlyoffice-redis - REDIS_SERVER_PORT=6379 stdin_open: true From 1fe33f849f3aa6f27a87c2e35bddb49376bd16f7 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 5 Mar 2019 18:12:54 +0300 Subject: [PATCH 06/11] Rename AMQP_SERVER_ENGINE->AMQP_SERVER_TYPE --- README.md | 2 +- activemq.yml | 2 +- run-document-server.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 524ca68..df1eb84 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ Below is the complete list of parameters that can be set using environment varia - **POSTGRESQL_SERVER_USER**: The new user name with superuser permissions for the PostgreSQL account. - **POSTGRESQL_SERVER_PASS**: The password set for the PostgreSQL account. - **AMQP_SERVER_URL**: The [AMQP URL](http://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server. -- **AMQP_SERVER_ENGINE**: The message broker engine. Supported values are 'rabbitmq' or 'activemq'. Defaults to 'rabbitmq'. +- **AMQP_SERVER_TYPE**: The message broker engine. Supported values are 'rabbitmq' or 'activemq'. Defaults to 'rabbitmq'. - **REDIS_SERVER_HOST**: The IP address or the name of the host where the Redis server is running. - **REDIS_SERVER_PORT**: The Redis server port number. - **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes. diff --git a/activemq.yml b/activemq.yml index 4f39e77..f6a5fed 100644 --- a/activemq.yml +++ b/activemq.yml @@ -5,7 +5,7 @@ services: image: onlyoffice/4testing-documentserver-ie:latest environment: - AMQP_SERVER_URL=amqp://guest:guest@onlyoffice-activemq - - AMQP_SERVER_ENGINE=activemq + - AMQP_SERVER_TYPE=activemq stdin_open: true restart: always ports: diff --git a/run-document-server.sh b/run-document-server.sh index 11aa8f4..82f1b85 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -64,7 +64,7 @@ read_setting(){ RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-$(${JSON} rabbitmq.url)} AMQP_SERVER_URL=${AMQP_SERVER_URL:-${RABBITMQ_SERVER_URL}} - AMQP_SERVER_ENGINE=${AMQP_SERVER_ENGINE:-rabbitmq} + AMQP_SERVER_TYPE=${AMQP_SERVER_TYPE:-rabbitmq} parse_rabbitmq_url ${AMQP_SERVER_URL} REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)} @@ -144,12 +144,12 @@ update_postgresql_settings(){ } update_rabbitmq_setting(){ - if [ "${AMQP_SERVER_ENGINE}" == "rabbitmq" ]; then + if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then ${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'" sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1true\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js fi - if [ "${AMQP_SERVER_ENGINE}" == "activemq" ]; then + if [ "${AMQP_SERVER_TYPE}" == "activemq" ]; then ${JSON} -I -e "if(this.activemq===undefined)this.activemq={};" ${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};" From c22686d264d9e5c8564f42f1f3b3c3b2715ff474 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 5 Mar 2019 18:14:50 +0300 Subject: [PATCH 07/11] Cosmetic --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index df1eb84..e438d83 100644 --- a/README.md +++ b/README.md @@ -168,7 +168,7 @@ Below is the complete list of parameters that can be set using environment varia - **POSTGRESQL_SERVER_USER**: The new user name with superuser permissions for the PostgreSQL account. - **POSTGRESQL_SERVER_PASS**: The password set for the PostgreSQL account. - **AMQP_SERVER_URL**: The [AMQP URL](http://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server. -- **AMQP_SERVER_TYPE**: The message broker engine. Supported values are 'rabbitmq' or 'activemq'. Defaults to 'rabbitmq'. +- **AMQP_SERVER_TYPE**: The message broker type. Supported values are `rabbitmq` or `activemq`. Defaults to `rabbitmq`. - **REDIS_SERVER_HOST**: The IP address or the name of the host where the Redis server is running. - **REDIS_SERVER_PORT**: The Redis server port number. - **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes. From 2a96d3c5f0c5dd4346d085229e1d7b803aea9456 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Wed, 6 Mar 2019 12:30:54 +0300 Subject: [PATCH 08/11] Change setup amqp server type --- run-document-server.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/run-document-server.sh b/run-document-server.sh index 82f1b85..da091d9 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -145,11 +145,12 @@ update_postgresql_settings(){ update_rabbitmq_setting(){ if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then + ${JSON} -I -e "this.queue.type = 'rabbitmq'" ${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'" - sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1true\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js fi if [ "${AMQP_SERVER_TYPE}" == "activemq" ]; then + ${JSON} -I -e "this.queue.type = 'activemq'" ${JSON} -I -e "if(this.activemq===undefined)this.activemq={};" ${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};" @@ -172,8 +173,6 @@ update_rabbitmq_setting(){ else ${JSON} -I -e "delete this.activemq.connectOptions.password" fi - - sed 's/\(exports\.USE_RABBIT_MQ = \).*\(;\)/'"\1false\2"'/' -i ${APP_DIR}/server/Common/sources/constants.js fi } From b47a70582a5444b971dbb7d5932b695f86162bd3 Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Thu, 7 Mar 2019 15:21:52 +0300 Subject: [PATCH 09/11] Fix setup amqp type --- run-document-server.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index da091d9..008de7b 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -145,11 +145,13 @@ update_postgresql_settings(){ update_rabbitmq_setting(){ if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then + ${JSON} -I -e "if(this.queue===undefined)this.queue={};" ${JSON} -I -e "this.queue.type = 'rabbitmq'" ${JSON} -I -e "this.rabbitmq.url = '${RABBITMQ_SERVER_URL}'" fi if [ "${AMQP_SERVER_TYPE}" == "activemq" ]; then + ${JSON} -I -e "if(this.queue===undefined)this.queue={};" ${JSON} -I -e "this.queue.type = 'activemq'" ${JSON} -I -e "if(this.activemq===undefined)this.activemq={};" ${JSON} -I -e "if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};" From 5031b7f983117e057af9b9371c4700ebf1185bb8 Mon Sep 17 00:00:00 2001 From: hellonadya Date: Wed, 15 May 2019 17:49:10 +0300 Subject: [PATCH 10/11] Update Readme.md - UTMs added to website links in Project information - Link to solutions comparison added to Project information --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e438d83..c921efb 100644 --- a/README.md +++ b/README.md @@ -295,7 +295,7 @@ Please note, that both executing the script and disconnecting users may take a l ## Project Information -Official website: [http://www.onlyoffice.org](http://onlyoffice.org "http://www.onlyoffice.org") +Official website: [https://www.onlyoffice.com](https://www.onlyoffice.com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS) Code repository: [https://github.com/ONLYOFFICE/DocumentServer](https://github.com/ONLYOFFICE/DocumentServer "https://github.com/ONLYOFFICE/DocumentServer") @@ -303,7 +303,9 @@ Docker Image: [https://github.com/ONLYOFFICE/Docker-DocumentServer](https://gith License: [GNU AGPL v3.0](https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=4358397&doc=K0ZUdlVuQzQ0RFhhMzhZRVN4ZFIvaHlhUjN2eS9XMXpKR1M5WEppUk1Gcz0_IjQzNTgzOTci0 "GNU AGPL v3.0") -SaaS version: [http://www.onlyoffice.com](http://www.onlyoffice.com "http://www.onlyoffice.com") +Free version vs commercial builds comparison: https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions + +SaaS version: [https://www.onlyoffice.com/cloud-office.aspx](https://www.onlyoffice.com/cloud-office.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS) ## User Feedback and Support From 2d6a4e0908612dfabbdc0488c22eea6e7cfd244b Mon Sep 17 00:00:00 2001 From: Alexey Golubev Date: Tue, 21 May 2019 16:06:58 +0300 Subject: [PATCH 11/11] Fix crash on system without ipv6 --- run-document-server.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/run-document-server.sh b/run-document-server.sh index 008de7b..29ea5be 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -277,6 +277,11 @@ update_nginx_settings(){ ln -sf ${NGINX_ONLYOFFICE_PATH}/ds.conf.tmpl ${NGINX_ONLYOFFICE_CONF} fi + # check if ipv6 supported otherwise remove it from nginx config + if [ ! -f /proc/net/if_inet6 ]; then + sed '/listen\s\+\[::[0-9]*\].\+/d' -i $NGINX_ONLYOFFICE_CONF + fi + if [ -f "${NGINX_ONLYOFFICE_EXAMPLE_CONF}" ]; then sed 's/linux/docker/' -i ${NGINX_ONLYOFFICE_EXAMPLE_CONF} fi