Compare commits

...

13 Commits

Author SHA1 Message Date
e76ae8b279 Fix local.json value and add to the data volume 2025-06-02 19:39:25 +03:00
a085cb962b Fix Oracle Instant Client installation 2025-05-19 09:52:22 +03:00
1bdda91da3 Fix multi-arch libaio symlink 2025-05-15 18:43:59 +03:00
11f153dd60 Fix bug 73689 – Replace hardcoded PDB and add libaio symlink (#23)
Co-authored-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
Co-committed-by: Vladimir Ischenko <vladimir.ischenko@onlyoffice.com>
2025-05-15 09:23:04 +00:00
019d1b881f Fix bug 73600 - Add DB name to MSSQL connection 2025-05-13 16:23:12 +03:00
39b82a3c9a build: add conditional tagging for latest in stable-build workflow
- Introduced  input in the GitHub Actions workflow with a default value of . - Passed the  input as an environment variable () to the workflow. - Updated  to conditionally add the  Docker tag based on  value.
2025-04-24 14:17:08 +03:00
d50eda45dd Merge branch hotfix/v8.3.3 into release/v9.0.0 2025-04-21 09:10:33 +00:00
ede8569ec2 Update README.md 2025-04-16 19:01:05 +03:00
ff98f18cb9 Merge branch hotfix/v8.3.2 into release/v9.0.0 2025-04-01 08:42:09 +00:00
9c2012b534 Bump zap scanner action version
Fix deprecated artifacts included action
2025-03-11 09:58:54 +00:00
2df1459d80 Merge branch release/v8.3.0 into develop 2025-02-24 09:14:43 +00:00
f4ae743455 Restrict the directories for log collection (#10)
Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/Docker-DocumentServer/pulls/10
2025-02-12 11:22:49 +00:00
b1fda38596 Merge branch hotfix/v8.2.2 into develop 2024-12-09 12:10:32 +00:00
6 changed files with 63 additions and 41 deletions

View File

@ -14,12 +14,18 @@ on:
type: string
required: true
default: '1'
latest:
description: 'Push latest tag?'
type: boolean
required: true
default: true
env:
COMPANY_NAME: "onlyoffice"
PRODUCT_NAME: "documentserver"
VERSION: ${{ github.event.inputs.tag }}
RELEASE_NUMBER: ${{ github.event.inputs.release_number }}
LATEST: ${{ github.event.inputs.latest }}
jobs:
build:

View File

@ -61,7 +61,7 @@ jobs:
# -j mean that scanning use AJAX Spider, with this spider the scan takes approximately an hour
# Without any cmd options will be used default spider and the scan takes approximately ~10-15 minutes
- name: ZAP Scan
uses: zaproxy/action-full-scan@v0.8.0
uses: zaproxy/action-full-scan@v0.12.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
docker_name: 'ghcr.io/zaproxy/zaproxy:stable'

View File

@ -9,13 +9,13 @@ ARG BASE_VERSION
ARG PG_VERSION=16
ARG PACKAGE_SUFFIX=t64
ENV OC_RELEASE_NUM=21
ENV OC_RU_VER=12
ENV OC_RELEASE_NUM=23
ENV OC_RU_VER=7
ENV OC_RU_REVISION_VER=0
ENV OC_RESERVED_NUM=0
ENV OC_RU_DATE=0
ENV OC_PATH=${OC_RELEASE_NUM}${OC_RU_VER}000
ENV OC_FILE_SUFFIX=${OC_RELEASE_NUM}.${OC_RU_VER}.${OC_RU_REVISION_VER}.${OC_RESERVED_NUM}.${OC_RU_DATE}${OC_FILE_SUFFIX}dbru
ENV OC_RESERVED_NUM=25
ENV OC_RU_DATE=01
ENV OC_PATH=${OC_RELEASE_NUM}${OC_RU_VER}0000
ENV OC_FILE_SUFFIX=${OC_RELEASE_NUM}.${OC_RU_VER}.${OC_RU_REVISION_VER}.${OC_RESERVED_NUM}.${OC_RU_DATE}
ENV OC_VER_DIR=${OC_RELEASE_NUM}_${OC_RU_VER}
ENV OC_DOWNLOAD_URL=https://download.oracle.com/otn_software/linux/instantclient/${OC_PATH}
@ -83,11 +83,12 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
service postgresql restart && \
sudo -u postgres psql -c "CREATE USER $ONLYOFFICE_VALUE WITH password '$ONLYOFFICE_VALUE';" && \
sudo -u postgres psql -c "CREATE DATABASE $ONLYOFFICE_VALUE OWNER $ONLYOFFICE_VALUE;" && \
wget -O basic.zip ${OC_DOWNLOAD_URL}/instantclient-basic-linux.x64-${OC_FILE_SUFFIX}.zip && \
wget -O sqlplus.zip ${OC_DOWNLOAD_URL}/instantclient-sqlplus-linux.x64-${OC_FILE_SUFFIX}.zip && \
unzip -d /usr/share basic.zip && \
unzip -d /usr/share sqlplus.zip && \
wget -O basic.zip ${OC_DOWNLOAD_URL}/instantclient-basic-linux.$(dpkg --print-architecture | sed 's/amd64/x64/')-${OC_FILE_SUFFIX}.zip && \
wget -O sqlplus.zip ${OC_DOWNLOAD_URL}/instantclient-sqlplus-linux.$(dpkg --print-architecture | sed 's/amd64/x64/')-${OC_FILE_SUFFIX}.zip && \
unzip -o basic.zip -d /usr/share && \
unzip -o sqlplus.zip -d /usr/share && \
mv /usr/share/instantclient_${OC_VER_DIR} /usr/share/instantclient && \
find /usr/lib /lib -name "libaio.so.1$PACKAGE_SUFFIX" -exec bash -c 'ln -sf "$0" "$(dirname "$0")/libaio.so.1"' {} \; && \
service postgresql stop && \
service redis-server stop && \
service rabbitmq-server stop && \

View File

@ -20,7 +20,7 @@
## Overview
ONLYOFFICE Document Server is an online office suite comprising viewers and editors for texts, spreadsheets and presentations, fully compatible with Office Open XML formats: .docx, .xlsx, .pptx and enabling collaborative editing in real time.
ONLYOFFICE Document Server is an open-source office suite that comprises all the tools you need to work with documents, spreadsheets, presentations, PDFs, and PDF forms. The suite supports office files of all popular formats (DOCX, ODT, XLSX, ODS, CSV, PPTX, ODP, etc.) and enables collaborative editing in real time.
Starting from version 6.0, Document Server is distributed as ONLYOFFICE Docs. It has [three editions](https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions). With this image, you will install the free Community version.

View File

@ -110,7 +110,7 @@ target "documentserver-stable" {
tags = ["docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTER_TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${SHORTEST_TAG}",
"docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest",
equal("true",LATEST) ? "docker.io/${COMPANY_NAME}/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:latest": "",
equal("-ee",PRODUCT_EDITION) ? "docker.io/${COMPANY_NAME}4enterprise/${PREFIX_NAME}${PRODUCT_NAME}${PRODUCT_EDITION}:${TAG}": "",]
platforms = ["linux/amd64", "linux/arm64"]
args = {

View File

@ -136,7 +136,8 @@ else
REDIS_ENABLED=true
fi
ONLYOFFICE_DEFAULT_CONFIG=${CONF_DIR}/local.json
ONLYOFFICE_LOCAL_CONFIG=${CONF_DIR}/local.json
ONLYOFFICE_DEFAULT_CONFIG=${DATA_DIR}/local.json
ONLYOFFICE_LOG4JS_CONFIG=${CONF_DIR}/log4js/production.json
ONLYOFFICE_EXAMPLE_CONFIG=${CONF_DIR}-example/local.json
@ -145,6 +146,12 @@ 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}"
if [ ! -s "${ONLYOFFICE_DEFAULT_CONFIG}" ] || ! ${JSON_BIN} -f "${ONLYOFFICE_DEFAULT_CONFIG}" . >/dev/null 2>&1; then
echo "{}" > "${ONLYOFFICE_DEFAULT_CONFIG}"
fi
ln -sf ${ONLYOFFICE_DEFAULT_CONFIG} ${ONLYOFFICE_LOCAL_CONFIG}
LOCAL_SERVICES=()
PG_ROOT=/var/lib/postgresql
@ -175,8 +182,10 @@ read_setting(){
METRICS_PORT="${METRICS_PORT:-8125}"
METRICS_PREFIX="${METRICS_PREFIX:-.ds}"
DB_HOST=${DB_HOST:-${POSTGRESQL_SERVER_HOST:-$(${JSON} services.CoAuthoring.sql.dbHost)}}
DB_TYPE=${DB_TYPE:-$(${JSON} services.CoAuthoring.sql.type)}
${JSON} -I -e "if(this.services===undefined)this.services={};"
${JSON} -I -e "if(this.services.CoAuthoring===undefined)this.services.CoAuthoring={};"
DB_HOST=${DB_HOST:-${POSTGRESQL_SERVER_HOST:-$(${JSON} services.CoAuthoring.sql.dbHost)}}; DB_HOST=${DB_HOST:-"localhost"}
DB_TYPE=${DB_TYPE:-$(${JSON} services.CoAuthoring.sql.type)}; DB_TYPE=${DB_TYPE:-"postgres"}
case $DB_TYPE in
"postgres")
DB_PORT=${DB_PORT:-"5432"}
@ -201,17 +210,17 @@ read_setting(){
exit 1
;;
esac
DB_NAME=${DB_NAME:-${POSTGRESQL_SERVER_DB_NAME:-$(${JSON} services.CoAuthoring.sql.dbName)}}
DB_USER=${DB_USER:-${POSTGRESQL_SERVER_USER:-$(${JSON} services.CoAuthoring.sql.dbUser)}}
DB_PWD=${DB_PWD:-${POSTGRESQL_SERVER_PASS:-$(${JSON} services.CoAuthoring.sql.dbPass)}}
DB_NAME=${DB_NAME:-${POSTGRESQL_SERVER_DB_NAME:-$(${JSON} services.CoAuthoring.sql.dbName)}}; DB_NAME=${DB_NAME:-"onlyoffice"}
DB_USER=${DB_USER:-${POSTGRESQL_SERVER_USER:-$(${JSON} services.CoAuthoring.sql.dbUser)}}; DB_USER=${DB_USER:-"onlyoffice"}
DB_PWD=${DB_PWD:-${POSTGRESQL_SERVER_PASS:-$(${JSON} services.CoAuthoring.sql.dbPass)}}; DB_PWD=${DB_PWD:-"onlyoffice"}
RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-$(${JSON} rabbitmq.url)}
RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-$(${JSON} rabbitmq.url)}; RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-"amqp://guest:guest@localhost"}
AMQP_URI=${AMQP_URI:-${AMQP_SERVER_URL:-${RABBITMQ_SERVER_URL}}}
AMQP_TYPE=${AMQP_TYPE:-${AMQP_SERVER_TYPE:-rabbitmq}}
AMQP_TYPE=${AMQP_TYPE:-${AMQP_SERVER_TYPE:-"rabbitmq"}}
parse_rabbitmq_url ${AMQP_URI}
REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)}
REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379}
REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)}; REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-"localhost"}
REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-"6379"}
DS_LOG_LEVEL=${DS_LOG_LEVEL:-$(${JSON_LOG} categories.default.level)}
}
@ -274,8 +283,7 @@ waiting_for_connection(){
waiting_for_db_ready(){
case $DB_TYPE in
"oracle")
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/${DB_NAME}"
DB_TEST="echo \"SELECT version FROM V\$INSTANCE;\" | $ORACLE_SQL 2>/dev/null | grep \"Connected\" | wc -l"
;;
*)
@ -319,6 +327,7 @@ update_statsd_settings(){
}
update_db_settings(){
${JSON} -I -e "if(this.services.CoAuthoring.sql===undefined)this.services.CoAuthoring.sql={};"
${JSON} -I -e "this.services.CoAuthoring.sql.type = '${DB_TYPE}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbHost = '${DB_HOST}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbPort = '${DB_PORT}'"
@ -330,6 +339,7 @@ update_db_settings(){
update_rabbitmq_setting(){
if [ "${AMQP_TYPE}" == "rabbitmq" ]; then
${JSON} -I -e "if(this.queue===undefined)this.queue={};"
${JSON} -I -e "if(this.rabbitmq===undefined)this.rabbitmq={};"
${JSON} -I -e "this.queue.type = 'rabbitmq'"
${JSON} -I -e "this.rabbitmq.url = '${AMQP_URI}'"
fi
@ -383,6 +393,15 @@ update_redis_settings(){
}
update_ds_settings(){
${JSON} -I -e "
[ 'services.CoAuthoring.token.inbox',
'services.CoAuthoring.token.outbox',
'services.CoAuthoring.token.enable.request',
'services.CoAuthoring.secret.inbox',
'services.CoAuthoring.secret.outbox',
'services.CoAuthoring.secret.session'
].forEach(path => path.split('.').reduce((obj, key) => (obj[key] = obj[key] || {}), this));"
${JSON} -I -e "this.services.CoAuthoring.token.enable.browser = ${JWT_ENABLED}"
${JSON} -I -e "this.services.CoAuthoring.token.enable.request.inbox = ${JWT_ENABLED}"
${JSON} -I -e "this.services.CoAuthoring.token.enable.request.outbox = ${JWT_ENABLED}"
@ -404,7 +423,7 @@ update_ds_settings(){
fi
if [ "${USE_UNAUTHORIZED_STORAGE}" == "true" ]; then
${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults===undefined)this.services.CoAuthoring.requestDefaults={}"
${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults===undefined)this.services.CoAuthoring.requestDefaults={};"
${JSON} -I -e "if(this.services.CoAuthoring.requestDefaults.rejectUnauthorized===undefined)this.services.CoAuthoring.requestDefaults.rejectUnauthorized=false"
fi
@ -510,7 +529,7 @@ upgrade_mysql_tbl() {
}
upgrade_mssql_tbl() {
CONN_PARAMS="-U $DB_USER -P "$DB_PWD" -C"
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 < "$APP_DIR/server/schema/mssql/removetbl.sql" >/dev/null 2>&1
@ -518,8 +537,7 @@ upgrade_mssql_tbl() {
}
upgrade_oracle_tbl() {
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/${DB_NAME}"
$ORACLE_SQL @$APP_DIR/server/schema/oracle/removetbl.sql >/dev/null 2>&1
$ORACLE_SQL @$APP_DIR/server/schema/oracle/createdb.sql >/dev/null 2>&1
@ -547,15 +565,14 @@ create_mysql_tbl() {
create_mssql_tbl() {
create_mssql_db
CONN_PARAMS="-U $DB_USER -P "$DB_PWD" -C"
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 < "$APP_DIR/server/schema/mssql/createdb.sql" >/dev/null 2>&1
}
create_oracle_tbl() {
PDB="XEPDB1"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/$PDB"
ORACLE_SQL="sqlplus $DB_USER/$DB_PWD@//$DB_HOST:$DB_PORT/${DB_NAME}"
$ORACLE_SQL @$APP_DIR/server/schema/oracle/createdb.sql >/dev/null 2>&1
}
@ -626,7 +643,7 @@ update_nginx_settings(){
sed 's/linux/docker/' -i ${NGINX_ONLYOFFICE_EXAMPLE_CONF}
fi
start_process documentserver-update-securelink.sh -s ${SECURE_LINK_SECRET:-$(pwgen -s 20)} -r false
LOCAL_CONF=${ONLYOFFICE_DEFAULT_CONFIG} start_process documentserver-update-securelink.sh -s ${SECURE_LINK_SECRET:-$(pwgen -s 20)} -r false
}
update_log_settings(){
@ -675,8 +692,8 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
update_ds_settings
# update settings by env variables
update_db_settings
if [ $DB_HOST != "localhost" ]; then
update_db_settings
waiting_for_db
create_db_tbl
else
@ -692,9 +709,8 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
LOCAL_SERVICES+=("postgresql")
fi
if [ ${AMQP_SERVER_HOST} != "localhost" ]; then
update_rabbitmq_setting
else
update_rabbitmq_setting
if [ ${AMQP_SERVER_HOST} = "localhost" ]; then
# change rights for rabbitmq directory
chown -R rabbitmq:rabbitmq ${RABBITMQ_DATA}
chmod -R go=rX,u=rwX ${RABBITMQ_DATA}
@ -710,9 +726,8 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
fi
if [ ${REDIS_ENABLED} = "true" ]; then
if [ ${REDIS_SERVER_HOST} != "localhost" ]; then
update_redis_settings
else
update_redis_settings
if [ ${REDIS_SERVER_HOST} = "localhost" ]; then
# change rights for redis directory
chown -R redis:redis ${REDIS_DATA}
chmod -R 750 ${REDIS_DATA}
@ -792,4 +807,4 @@ start_process documentserver-static-gzip.sh ${ONLYOFFICE_DATA_CONTAINER}
echo "${JWT_MESSAGE}"
start_process tail -f /var/log/${COMPANY_NAME}/**/*.log
start_process find "$DS_LOG_DIR" "$DS_LOG_DIR-example" -type f -name "*.log" | xargs tail -f