Compare commits

...

18 Commits

Author SHA1 Message Date
feadbdf42b Add empty directory for local font cache 2025-11-13 08:52:10 +00:00
b13570f221 Add msfonts caching to avoid install issues 2025-11-13 08:52:10 +00:00
32b11818cc Disable zap ajax spider untill action not fixed 2025-11-11 15:14:03 +00:00
d20143734d Fix cosmetic typos in README 2025-11-01 14:44:54 +03:00
818573b9ba fix Bug 77433 - Fix duplicate tables in public when using DB_SCHEMA 2025-10-24 11:43:09 +00:00
92936a7971 Fix bug 71003 - Install plugins before services start (#51)
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
2025-10-24 11:41:36 +00:00
ba4961c28f Update important notice 2025-10-15 12:15:01 +00:00
5279cd3ea4 Merge branch release/v9.1.0 into master 2025-10-14 14:45:54 +00:00
a26d08992a Fix bug 70360 - Add NGINX_ACCESS_LOG to enable nginx access logs (#49)
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
2025-10-07 12:00:52 +00:00
5da9390fe6 fix Bug 77296 - Correct the display of adminpanel logs 2025-10-07 13:17:07 +02:00
1e6815a0c0 Fix the error of missing pgPoolExtraOptions when installing DB_SCHEMA 2025-10-03 17:46:02 +02:00
fce9f747a2 Disable automatic startup of the adminpanel service after installation 2025-10-03 15:17:17 +02:00
b42b6628e6 Add the missing field secret.browser.string 2025-09-25 19:35:33 +02:00
1197520921 Add support for specifying schema in psql 2025-09-23 07:38:07 +00:00
d937c9aa89 Add the ability to specify additional redis parameters 2025-09-15 19:50:43 +02:00
289ce658d9 Fix Docker startup; Add adminpanel log dir creation 2025-09-06 15:33:54 +03:00
c533386cd9 Feature/Add supervisor admin-panel services 2025-09-04 19:44:51 +03:00
00aee48855 Merge branch hotfix/v9.0.4 into master 2025-08-05 14:15:32 +00:00
8 changed files with 109 additions and 37 deletions

View File

@ -106,6 +106,22 @@ jobs:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
- name: Prepare fonts cache
id: fonts
uses: actions/cache@v4
with:
path: fonts
key: fonts-${{ runner.os }}-v1
- name: Install fonts if not cached
if: steps.fonts.outputs.cache-hit != 'true'
run: |
sudo apt-get update
echo "ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true" | sudo debconf-set-selections
sudo apt-get install -y ttf-mscorefonts-installer
mkdir -p fonts/msttcorefonts
cp -a /usr/share/fonts/truetype/msttcorefonts/* fonts/msttcorefonts/
- name: Build 4testing
id: build-ds
env:

View File

@ -67,4 +67,4 @@ jobs:
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'
target: 'https://${{ steps.run-ds.outputs.local-ip }}/'
allow_issue_writing: false
cmd_options: '-j'
#cmd_options: '-j'

View File

@ -22,6 +22,7 @@ ENV OC_DOWNLOAD_URL=https://download.oracle.com/otn_software/linux/instantclient
ENV LANG=en_US.UTF-8 LANGUAGE=en_US:en LC_ALL=en_US.UTF-8 DEBIAN_FRONTEND=noninteractive PG_VERSION=${PG_VERSION} BASE_VERSION=${BASE_VERSION}
ARG ONLYOFFICE_VALUE=onlyoffice
COPY fonts/ /usr/share/fonts/truetype/
RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
apt-get -y update && \
@ -74,7 +75,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
xxd \
zlib1g || dpkg --configure -a && \
# Added dpkg --configure -a to handle installation issues with rabbitmq-server on arm64 architecture
if [ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -ne 61 ]; \
if [ $(find /usr/share/fonts/truetype/msttcorefonts -maxdepth 1 -type f -iname '*.ttf' | wc -l) -lt 30 ]; \
then echo 'msttcorefonts failed to download'; exit 1; fi && \
echo "SERVER_ADDITIONAL_ERL_ARGS=\"+S 1:1\"" | tee -a /etc/rabbitmq/rabbitmq-env.conf && \
sed -i "s/bind .*/bind 127.0.0.1/g" /etc/redis/redis.conf && \
@ -121,6 +122,8 @@ RUN PACKAGE_FILE="${COMPANY_NAME}-${PRODUCT_NAME}${PRODUCT_EDITION}${PACKAGE_VER
apt-get -y update && \
service postgresql start && \
apt-get -yq install /tmp/$PACKAGE_FILE && \
PGPASSWORD=$ONLYOFFICE_VALUE dropdb -h localhost -p 5432 -U $ONLYOFFICE_VALUE $ONLYOFFICE_VALUE && \
sudo -u postgres psql -c "DROP ROLE onlyoffice;" && \
service postgresql stop && \
chmod 755 /etc/init.d/supervisor && \
sed "s/COMPANY_NAME/${COMPANY_NAME}/g" -i /etc/supervisor/conf.d/*.conf && \

View File

@ -26,7 +26,7 @@ Starting from version 6.0, Document Server is distributed as ONLYOFFICE Docs. It
ONLYOFFICE Docs can be used as a part of [ONLYOFFICE DocSpace](https://www.onlyoffice.com/docspace.aspx) and ONLYOFFICE Workspace, or with [third-party sync&share solutions](https://www.onlyoffice.com/all-connectors.aspx) (e.g. Odoo, Moodle, Nextcloud, ownCloud, Seafile, etc.) to enable collaborative editing within their interface.
***Important*** Please update `docker-engine` to latest version (`20.10.21` as of writing this doc) before using it. We use `ubuntu:22.04` as base image and it older versions of docker have compatibility problems with it
***Important*** Please update `docker-engine` to latest version (`20.10.21` as of writing this doc) before using it. We use `ubuntu:24.04` as base image and it older versions of docker have compatibility problems with it
## Functionality ##
@ -100,7 +100,7 @@ To change the port, use the -p command. E.g.: to make your portal accessible via
sudo docker run -i -t -d -p 443:443 \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data onlyoffice/documentserver
Access to the onlyoffice application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, a self signed certificates can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
Access to the ONLYOFFICE application can be secured using SSL so as to prevent unauthorized access. While a CA certified SSL certificate allows for verification of trust via the CA, a self-signed certificate can also provide an equal level of trust verification as long as each client takes some additional steps to verify the identity of your website. Below the instructions on achieving this are provided.
To secure the application via SSL basically two things are needed:
@ -112,7 +112,7 @@ So you need to create and install the following files:
/app/onlyoffice/DocumentServer/data/certs/tls.key
/app/onlyoffice/DocumentServer/data/certs/tls.crt
When using CA certified certificates (e.g [Let's encrypt](https://letsencrypt.org)), these files are provided to you by the CA. If you are using self-signed certificates you need to generate these files [yourself](#generation-of-self-signed-certificates).
When using CA certified certificates (e.g. [Let's Encrypt](https://letsencrypt.org)), these files are provided to you by the CA. If you are using self-signed certificates you need to generate these files [yourself](#generation-of-self-signed-certificates).
#### Using the automatically generated Let's Encrypt SSL Certificates
@ -156,9 +156,9 @@ openssl dhparam -out dhparam.pem 2048
#### Installation of the SSL Certificates
Out of the four files generated above, you need to install the `tls.key`, `tls.crt` and `dhparam.pem` files at the onlyoffice server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
Out of the four files generated above, you need to install the `tls.key`, `tls.crt` and `dhparam.pem` files at the ONLYOFFICE server. The CSR file is not needed, but do make sure you safely backup the file (in case you ever need it again).
The default path that the onlyoffice application is configured to look for the SSL certificates is at `/var/www/onlyoffice/Data/certs`, this can however be changed using the `SSL_KEY_PATH`, `SSL_CERTIFICATE_PATH` and `SSL_DHPARAM_PATH` configuration options.
The default path that the ONLYOFFICE application is configured to look for the SSL certificates is at `/var/www/onlyoffice/Data/certs`, this can however be changed using the `SSL_KEY_PATH`, `SSL_CERTIFICATE_PATH` and `SSL_DHPARAM_PATH` configuration options.
The `/var/www/onlyoffice/Data/` path is the path of the data store, which means that you have to create a folder named certs inside `/app/onlyoffice/DocumentServer/data/` and copy the files into it and as a measure of security you will update the permission on the `tls.key` file to only be readable by the owner.
@ -179,7 +179,7 @@ You are now just one step away from having our application secured.
Below is the complete list of parameters that can be set using environment variables.
- **ONLYOFFICE_HTTPS_HSTS_ENABLED**: Advanced configuration option for turning off the HSTS configuration. Applicable only when SSL is in use. Defaults to `true`.
- **ONLYOFFICE_HTTPS_HSTS_MAXAGE**: Advanced configuration option for setting the HSTS max-age in the onlyoffice nginx vHost configuration. Applicable only when SSL is in use. Defaults to `31536000`.
- **ONLYOFFICE_HTTPS_HSTS_MAXAGE**: Advanced configuration option for setting the HSTS max-age in the ONLYOFFICE nginx vHost configuration. Applicable only when SSL is in use. Defaults to `31536000`.
- **SSL_CERTIFICATE_PATH**: The path to the SSL certificate to use. Defaults to `/var/www/onlyoffice/Data/certs/tls.crt`.
- **SSL_KEY_PATH**: The path to the SSL certificate's private key. Defaults to `/var/www/onlyoffice/Data/certs/tls.key`.
- **SSL_DHPARAM_PATH**: The path to the Diffie-Hellman parameter. Defaults to `/var/www/onlyoffice/Data/certs/dhparam.pem`.
@ -191,13 +191,19 @@ Below is the complete list of parameters that can be set using environment varia
- **DB_NAME**: The name of a database to use. Should be existing on container startup.
- **DB_USER**: The new user name with superuser permissions for the database account.
- **DB_PWD**: The password set for the database account.
- **DB_SCHEMA**: Database schema name (optional).
- **PostgreSQL** — schema for [search_path](https://www.postgresql.org/docs/current/ddl-schemas.html#DDL-SCHEMAS-PATH), default `public`.
- **MSSQL** — schema to set as [DEFAULT_SCHEMA](https://learn.microsoft.com/en-us/sql/t-sql/statements/alter-user-transact-sql?view=sql-server-ver17#default_schema---schema_name--null-), default `dbo`.
- **AMQP_URI**: The [AMQP URI](https://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server.
- **AMQP_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.
- **REDIS_SERVER_USER**: The Redis server username. The username is not set by default.
- **REDIS_SERVER_PASS**: The Redis server password. The password is not set by default.
- **REDIS_SERVER_DB**: The Redis database index number to select. Defaults to `0`.
- **NGINX_WORKER_PROCESSES**: Defines the number of nginx worker processes.
- **NGINX_WORKER_CONNECTIONS**: Sets the maximum number of simultaneous connections that can be opened by a nginx worker process.
- **NGINX_ACCESS_LOG**: Defines whether access logging is enabled. Defaults to `false`.
- **SECURE_LINK_SECRET**: Defines secret for the nginx config directive [secure_link_md5](https://nginx.org/en/docs/http/ngx_http_secure_link_module.html#secure_link_md5). Defaults to `random string`.
- **JWT_ENABLED**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Document Server. Defaults to `true`.
- **JWT_SECRET**: Defines the secret key to validate the JSON Web Token in the request to the ONLYOFFICE Document Server. Defaults to random value.
@ -206,14 +212,14 @@ Below is the complete list of parameters that can be set using environment varia
- **WOPI_ENABLED**: Specifies the enabling the wopi handlers. Defaults to `false`.
- **ALLOW_META_IP_ADDRESS**: Defines if it is allowed to connect meta IP address or not. Defaults to `false`.
- **ALLOW_PRIVATE_IP_ADDRESS**: Defines if it is allowed to connect private IP address or not. Defaults to `false`.
- **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned certificates for your storage server e.g. Nextcloud. Defaults to `false`
- **USE_UNAUTHORIZED_STORAGE**: Set to `true` if using self-signed certificates for your storage server e.g. Nextcloud. Defaults to `false`
- **GENERATE_FONTS**: When 'true' regenerates fonts list and the fonts thumbnails etc. at each start. Defaults to `true`
- **METRICS_ENABLED**: Specifies the enabling StatsD for ONLYOFFICE Document Server. Defaults to `false`.
- **METRICS_HOST**: Defines StatsD listening host. Defaults to `localhost`.
- **METRICS_PORT**: Defines StatsD listening port. Defaults to `8125`.
- **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_MAIL**: Defines the domain administator mail address for Let's Encrypt certificate.
- **LETS_ENCRYPT_MAIL**: Defines the domain administrator mail address for Let's Encrypt certificate.
- **PLUGINS_ENABLED**: Defines whether to enable default plugins. Defaults to `true`.
## Installing ONLYOFFICE Document Server using Docker Compose
@ -382,7 +388,7 @@ For more information, visit the official [Docker manual site](https://docs.docke
As a relatively new project Docker is being worked on and actively developed by its community. So it's recommended to use the latest version of Docker, because the issues that you encounter might have already been fixed with a newer Docker release.
The known Docker issue with ONLYOFFICE Document Server with rpm-based distributives is that sometimes the processes fail to start inside Docker container. Fedora and RHEL/CentOS users should try disabling selinux with setenforce 0. If it fixes the issue then you can either stick with SELinux disabled which is not recommended by RedHat, or switch to using Ubuntu.
The known Docker issue with ONLYOFFICE Document Server with rpm-based distributives is that sometimes the processes fail to start inside Docker container. Fedora and RHEL/CentOS users should try disabling SELinux with setenforce 0. If it fixes the issue then you can either stick with SELinux disabled which is not recommended by Red Hat, or switch to using Ubuntu.
### Document Server usage issues

View File

@ -0,0 +1,13 @@
[program:adminpanel]
command=/var/www/COMPANY_NAME/documentserver/server/AdminPanel/server/adminpanel
directory=/var/www/COMPANY_NAME/documentserver/server/AdminPanel
user=ds
environment=NODE_ENV=production-linux,NODE_CONFIG_DIR=/etc/COMPANY_NAME/documentserver,NODE_DISABLE_COLORS=1,APPLICATION_NAME=COMPANY_NAME
stdout_logfile=/var/log/COMPANY_NAME/documentserver/adminpanel/out.log
stdout_logfile_backups=0
stdout_logfile_maxbytes=0
stderr_logfile=/var/log/COMPANY_NAME/documentserver/adminpanel/err.log
stderr_logfile_backups=0
stderr_logfile_maxbytes=0
autostart=false
autorestart=false

View File

@ -1,2 +1,2 @@
[group:ds]
programs=docservice,converter,metrics,example
programs=docservice,converter,metrics,example,adminpanel

0
fonts/.placeholder Normal file
View File

View File

@ -103,6 +103,7 @@ NGINX_ONLYOFFICE_EXAMPLE_CONF="${NGINX_ONLYOFFICE_EXAMPLE_PATH}/includes/ds-exam
NGINX_CONFIG_PATH="/etc/nginx/nginx.conf"
NGINX_WORKER_PROCESSES=${NGINX_WORKER_PROCESSES:-1}
NGINX_ACCESS_LOG=${NGINX_ACCESS_LOG:-false}
# Limiting the maximum number of simultaneous connections due to possible memory shortage
LIMIT=$(ulimit -n); [ $LIMIT -gt 1048576 ] && LIMIT=1048576
NGINX_WORKER_CONNECTIONS=${NGINX_WORKER_CONNECTIONS:-$LIMIT}
@ -374,10 +375,11 @@ update_redis_settings(){
${JSON} -I -e "this.services.CoAuthoring.redis.host = '${REDIS_SERVER_HOST}'"
${JSON} -I -e "this.services.CoAuthoring.redis.port = '${REDIS_SERVER_PORT}'"
if [ -n "${REDIS_SERVER_PASS}" ]; then
${JSON} -I -e "this.services.CoAuthoring.redis.options = {'password':'${REDIS_SERVER_PASS}'}"
fi
${JSON} -I -e "this.services.CoAuthoring.redis.options = {
${REDIS_SERVER_USER:+username: '${REDIS_SERVER_USER}',}
${REDIS_SERVER_PASS:+password: '${REDIS_SERVER_PASS}',}
${REDIS_SERVER_DB:+database: '${REDIS_SERVER_DB}',}
}"
}
update_ds_settings(){
@ -388,6 +390,7 @@ update_ds_settings(){
${JSON} -I -e "this.services.CoAuthoring.secret.inbox.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.outbox.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.session.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.secret.browser.string = '${JWT_SECRET}'"
${JSON} -I -e "this.services.CoAuthoring.token.inbox.header = '${JWT_HEADER}'"
${JSON} -I -e "this.services.CoAuthoring.token.outbox.header = '${JWT_HEADER}'"
@ -449,9 +452,7 @@ create_postgresql_db(){
}
create_mssql_db(){
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT"
$MSSQL -U $DB_USER -P "$DB_PWD" -C -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = '$DB_NAME') BEGIN CREATE DATABASE $DB_NAME; END"
${MSSQL/ -d $DB_NAME/} -b -Q "IF NOT EXISTS (SELECT * FROM sys.databases WHERE name = '$DB_NAME') BEGIN CREATE DATABASE [$DB_NAME]; END"
}
create_db_tbl() {
@ -488,6 +489,22 @@ upgrade_db_tbl() {
esac
}
postgresql_check_schema(){
DB_SCHEMA=${DB_SCHEMA:-$(${JSON} services.CoAuthoring.sql.pgPoolExtraOptions.options 2>/dev/null | sed -n 's/.*search_path=\([^, ]*\).*/\1/p')}
if [ -n "${DB_SCHEMA}" ]; then
export PGOPTIONS="-c search_path=${DB_SCHEMA}"
$PSQL -c "CREATE SCHEMA IF NOT EXISTS ${DB_SCHEMA};" >/dev/null 2>&1
${JSON} -I -e "this.services.CoAuthoring.sql.pgPoolExtraOptions ||= {}; this.services.CoAuthoring.sql.pgPoolExtraOptions.options = '${PGOPTIONS}'"
fi
}
mssql_check_schema(){
if [ -n "${DB_SCHEMA}" ]; then
${MSSQL} -b -Q "DECLARE @s sysname=N'${DB_SCHEMA}'; IF SCHEMA_ID(@s) IS NULL BEGIN DECLARE @sql nvarchar(max); SET @sql=N'CREATE SCHEMA '+QUOTENAME(@s)+N' AUTHORIZATION '+QUOTENAME(N'${DB_USER}'); EXEC(@sql); END"
${MSSQL} -b -Q "DECLARE @s sysname=N'${DB_SCHEMA}'; DECLARE @u sysname=N'${DB_USER}'; IF USER_ID(@u) IS NOT NULL BEGIN DECLARE @sql nvarchar(max); SET @sql=N'ALTER USER '+QUOTENAME(@u)+N' WITH DEFAULT_SCHEMA = '+QUOTENAME(@s); EXEC(@sql); END"
fi
}
upgrade_postgresql_tbl() {
if [ -n "$DB_PWD" ]; then
export PGPASSWORD=$DB_PWD
@ -495,6 +512,7 @@ upgrade_postgresql_tbl() {
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
postgresql_check_schema
$PSQL -f "$APP_DIR/server/schema/postgresql/removetbl.sql"
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
}
@ -508,9 +526,13 @@ upgrade_mysql_tbl() {
}
upgrade_mssql_tbl() {
CONN_PARAMS="-d $DB_NAME -U $DB_USER -P "$DB_PWD" -C"
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT $CONN_PARAMS"
if [ -n "$DB_PWD" ]; then
export SQLCMDPASSWORD=$DB_PWD
fi
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT -d $DB_NAME -U $DB_USER -C"
mssql_check_schema
$MSSQL < "$APP_DIR/server/schema/mssql/removetbl.sql" >/dev/null 2>&1
$MSSQL < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
@ -528,6 +550,8 @@ create_postgresql_tbl() {
fi
PSQL="psql -q -h$DB_HOST -p$DB_PORT -d$DB_NAME -U$DB_USER -w"
postgresql_check_schema
$PSQL -f "$APP_DIR/server/schema/postgresql/createdb.sql"
}
@ -542,11 +566,14 @@ create_mysql_tbl() {
}
create_mssql_tbl() {
if [ -n "$DB_PWD" ]; then
export SQLCMDPASSWORD=$DB_PWD
fi
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT -d $DB_NAME -U $DB_USER -C"
create_mssql_db
CONN_PARAMS="-d $DB_NAME -U $DB_USER -P "$DB_PWD" -C"
MSSQL="/opt/mssql-tools18/bin/sqlcmd -S $DB_HOST,$DB_PORT $CONN_PARAMS"
mssql_check_schema
$MSSQL < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
@ -578,7 +605,13 @@ update_nginx_settings(){
# Set up nginx
sed 's/^worker_processes.*/'"worker_processes ${NGINX_WORKER_PROCESSES};"'/' -i ${NGINX_CONFIG_PATH}
sed 's/worker_connections.*/'"worker_connections ${NGINX_WORKER_CONNECTIONS};"'/' -i ${NGINX_CONFIG_PATH}
sed 's/access_log.*/'"access_log off;"'/' -i ${NGINX_CONFIG_PATH}
if [ "${NGINX_ACCESS_LOG}" = "true" ]; then
touch "${DS_LOG_DIR}/nginx.access.log"
sed -ri 's|^\s*access_log\b.*;|access_log '"${DS_LOG_DIR}"'/nginx.access.log;|' "${NGINX_CONFIG_PATH}" "${NGINX_ONLYOFFICE_PATH}/includes/ds-common.conf" 2>/dev/null
else
sed -ri 's|^\s*access_log\b.*;|access_log off;|' "${NGINX_CONFIG_PATH}"
fi
# setup HTTPS
if [ -f "${SSL_CERTIFICATE_PATH}" -a -f "${SSL_KEY_PATH}" ]; then
@ -639,11 +672,11 @@ update_release_date(){
}
# create base folders
for i in converter docservice metrics; do
mkdir -p "${DS_LOG_DIR}/$i"
for i in converter docservice metrics adminpanel; do
mkdir -p "$DS_LOG_DIR/$i" && touch "$DS_LOG_DIR/$i"/{out,err}.log
done
mkdir -p ${DS_LOG_DIR}-example
mkdir -p "${DS_LOG_DIR}-example" && touch "${DS_LOG_DIR}-example"/{out,err}.log
# create app folders
for i in ${DS_LIB_DIR}/App_Data/cache/files ${DS_LIB_DIR}/App_Data/docbuilder ${DS_LIB_DIR}-example/files; do
@ -739,7 +772,8 @@ for i in ${LOCAL_SERVICES[@]}; do
service $i start
done
if [ ${PG_NEW_CLUSTER} = "true" ]; then
PG_DB_EXISTS=$(PGPASSWORD="$DB_PWD" psql -h ${DB_HOST} -p${DB_PORT} -U "${DB_USER}" -tAc "SELECT 1 FROM pg_database WHERE datname='${DB_NAME}';" 2>/dev/null)
if [ ${PG_NEW_CLUSTER} = "true" ] || [ "${PG_DB_EXISTS}" != "1" ]; then
create_postgresql_db
create_postgresql_tbl
fi
@ -758,6 +792,12 @@ if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then
update_nginx_settings
if [ "${PLUGINS_ENABLED}" = "true" ]; then
echo -n Installing plugins, please wait...
start_process documentserver-pluginsmanager.sh -r false --update=\"${APP_DIR}/sdkjs-plugins/plugin-list-default.json\" >/dev/null
echo Done
fi
service supervisor start
# start cron to enable log rotating
@ -783,14 +823,8 @@ if [ "${GENERATE_FONTS}" == "true" ]; then
start_process documentserver-generate-allfonts.sh ${ONLYOFFICE_DATA_CONTAINER}
fi
if [ "${PLUGINS_ENABLED}" = "true" ]; then
echo -n Installing plugins, please wait...
start_process documentserver-pluginsmanager.sh -r false --update=\"${APP_DIR}/sdkjs-plugins/plugin-list-default.json\" >/dev/null
echo Done
fi
start_process documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}
echo "${JWT_MESSAGE}"
start_process find "$DS_LOG_DIR" "$DS_LOG_DIR-example" -type f -name "*.log" | xargs tail -f
start_process find "$DS_LOG_DIR" "$DS_LOG_DIR-example" -type f -name "*.log" | xargs tail -F