Merge branch 'release/v6.1.0' into feature/disable-gen-fonts

This commit is contained in:
Roman Demidov 2020-10-20 15:50:52 +03:00 committed by GitHub
commit 6e2e7c9d7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 136 additions and 15 deletions

View file

@ -10,6 +10,7 @@ env:
- config: standalone.yml
PRODUCT_NAME: documentserver-ie
# certificates (default tls if onlyoffice not exists)
- config: certs.yml
ssl: true
@ -30,10 +31,27 @@ env:
SSL_CERTIFICATE_PATH: /var/www/onlyoffice/Data/certs/mycert.crt
SSL_KEY_PATH: /var/www/onlyoffice/Data/certs/mycert.key
# postgresql
# postgresql 12
- config: postgres.yml
POSTGRES_VERSION: 12
# postgresql 11
- config: postgres.yml
POSTGRES_VERSION: 11
# postgresql 10
- config: postgres.yml
POSTGRES_VERSION: 10
# postgresql 9
- config: postgres.yml
POSTGRES_VERSION: 9
# postgresql 9.5
- config: postgres.yml
# custom values
# postgresql custom values
- config: postgres.yml
DB_NAME: mydb
DB_USER: myuser
@ -41,31 +59,67 @@ env:
POSTGRES_DB: mydb
POSTGRES_USER: myuser
# deprecated variables
# postgresql deprecated variables
- config: postgres-old.yml
# mysql
# mysql 8
- config: mysql.yml
MYSQL_VERSION: 8
# mysql 5
- config: mysql.yml
MYSQL_VERSION: 5
# mysql 5.7
- config: mysql.yml
# mariadb
# mariadb 10
- config: mariadb.yml
MARIADB_VERSION: 10
# mariadb 10.5
- config: mariadb.yml
# activemq
- config: activemq.yml
ACTIVEMQ_VERSION: latest
# activemq 5.14.3
- config: activemq.yml
# rabbitmq
# rabbitmq latest
- config: rabbitmq.yml
# rabbitmq 3
- config: rabbitmq.yml
RABBITMQ_VERSION: 3
# rabbitmq old variables
- config: rabbitmq-old.yml
# redis with community edition
# redis latest with community edition
- config: redis.yml
# redis with integraion edition
# redis latest with integraion edition
- config: redis.yml
PRODUCT_NAME: documentserver-ie
# redis 6
- config: redis.yml
REDIS_VERSION: 6
# redis 5
- config: redis.yml
REDIS_VERSION: 5
# graphite
- config: graphite.yml
services:
- docker

View file

@ -10,6 +10,7 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
apt-get -yq install wget apt-transport-https gnupg locales && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0x8320ca65cb2de8e5 && \
locale-gen en_US.UTF-8 && \
echo ttf-mscorefonts-installer msttcorefonts/accepted-mscorefonts-eula select true | debconf-set-selections && \
apt-get -yq install \
adduser \
apt-utils \
@ -41,8 +42,11 @@ RUN echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d && \
software-properties-common \
sudo \
supervisor \
ttf-mscorefonts-installer \
xvfb \
zlib1g && \
if [ $(ls -l /usr/share/fonts/truetype/msttcorefonts | wc -l) -ne 61 ]; \
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 && \
sed 's|\(application\/zip.*\)|\1\n application\/wasm wasm;|' -i /etc/nginx/mime.types && \

View file

@ -182,6 +182,11 @@ Below is the complete list of parameters that can be set using environment varia
- **JWT_IN_BODY**: Specifies the enabling the token validation in the request body to the ONLYOFFICE Document Server. Defaults to `false`.
- **USE_UNAUTHORIZED_STORAGE**: Set to `true`if using selfsigned 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.`.
## Installing ONLYOFFICE Document Server integrated with Community and Mail Servers

View file

@ -92,6 +92,11 @@ read_setting(){
deprecated_var AMQP_SERVER_URL AMQP_URI
deprecated_var AMQP_SERVER_TYPE AMQP_TYPE
METRICS_ENABLED="${METRICS_ENABLED:-false}"
METRICS_HOST="${METRICS_HOST:-localhost}"
METRICS_PORT="${METRICS_PORT:-8125}"
METRICS_PREFIX="${METRICS_PREFIX:-.ds}"
DB_HOST=${DB_HOST:-${POSTGRESQL_SERVER_HOST:-$(${JSON} services.CoAuthoring.sql.dbHost)}}
case $DB_TYPE in
"postgres")
@ -193,6 +198,15 @@ waiting_for_redis(){
waiting_for_datacontainer(){
waiting_for_connection ${ONLYOFFICE_DATA_CONTAINER_HOST} ${ONLYOFFICE_DATA_CONTAINER_PORT}
}
update_statsd_settings(){
${JSON} -I -e "if(this.statsd===undefined)this.statsd={};"
${JSON} -I -e "this.statsd.useMetrics = '${METRICS_ENABLED}'"
${JSON} -I -e "this.statsd.host = '${METRICS_HOST}'"
${JSON} -I -e "this.statsd.port = '${METRICS_PORT}'"
${JSON} -I -e "this.statsd.prefix = '${METRICS_PREFIX}'"
}
update_db_settings(){
${JSON} -I -e "this.services.CoAuthoring.sql.type = '${DB_TYPE}'"
${JSON} -I -e "this.services.CoAuthoring.sql.dbHost = '${DB_HOST}'"
@ -434,6 +448,10 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
read_setting
if [ $METRICS_ENABLED = "true" ]; then
update_statsd_settings
fi
update_welcome_page
update_log_settings

View file

@ -17,7 +17,7 @@ services:
onlyoffice-activemq:
container_name: onlyoffice-activemq
image: webcenter/activemq:5.14.3
image: webcenter/activemq:${ACTIVEMQ_VERSION:-5.14.3}
environment:
- ACTIVEMQ_USERS_guest=${ACTIVEMQ_USERS_guest:-guest}
- ACTIVEMQ_GROUPS_owners=${ACTIVEMQ_GROUPS_owners:-guest}

32
tests/graphite.yml Normal file
View file

@ -0,0 +1,32 @@
version: '2.1'
services:
onlyoffice-documentserver:
container_name: onlyoffice-documentserver
build:
context: ../.
depends_on:
- onlyoffice-graphite
environment:
- METRICS_ENABLED=${METRICS_ENABLED:-true}
- METRICS_HOST=${METRICS_HOST:-localhost}
- METRICS_PORT=${METRICS_PORT:-8125}
- METRICS_PREFIX=${METRICS_PREFIX:-ds.}
stdin_open: true
restart: always
expose:
- '2003'
ports:
- '80:80'
volumes:
- ./graphite/statsd:/var/www/onlyoffice/documentserver/server/Metrics/config
onlyoffice-graphite:
container_name: onlyoffice-graphite
image: graphiteapp/graphite-statsd
environment:
- GRAPHITE_STATSD_HOST=${GRAPHITE_STATSD_HOST:-onlyoffice-documentserver}
- GRAPHITE_TIME_ZONE=${GRAPHITE_TIME_ZONE:-Etc/UTC}
ports:
- '8888:80'
stdin_open: true
restart: always

View file

@ -0,0 +1,7 @@
{
"graphiteHost": "onlyoffice-graphite",
"graphitePort": 2003,
"port": 8125,
"flushInterval": 60000,
"backends": [ "./backends/graphite.js" ]
}

View file

@ -20,7 +20,7 @@ services:
onlyoffice-mariadb:
container_name: onlyoffice-mariadb
image: mariadb:10.5
image: mariadb:${MARIADB_VERSION:-10.5}
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-onlyoffice}
- MYSQL_USER=${MYSQL_USER:-onlyoffice}

View file

@ -20,7 +20,8 @@ services:
onlyoffice-mysql:
container_name: onlyoffice-mysql
image: mysql:5.7
image: mysql:${MYSQL_VERSION:-5.7}
command: --default-authentication-plugin=mysql_native_password
environment:
- MYSQL_DATABASE=${MYSQL_DATABASE:-onlyoffice}
- MYSQL_USER=${MYSQL_USER:-onlyoffice}

View file

@ -20,7 +20,7 @@ services:
onlyoffice-postgresql:
container_name: onlyoffice-postgresql
image: postgres:9.5
image: postgres:${POSTGRES_VERSION:-9.5}
environment:
- POSTGRES_DB=${POSTGRES_DB:-onlyoffice}
- POSTGRES_USER=${POSTGRES_USER:-onlyoffice}

View file

@ -17,7 +17,7 @@ services:
onlyoffice-rabbitmq:
container_name: onlyoffice-rabbitmq
image: rabbitmq
image: rabbitmq:${RABBITMQ_VERSION:-latest}
restart: always
networks:
- onlyoffice

View file

@ -19,7 +19,7 @@ services:
onlyoffice-redis:
container_name: onlyoffice-redis
image: redis
image: redis:${REDIS_VERSION:-latest}
restart: always
networks:
- onlyoffice