Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge release/v8.0.0 into master #107

Merged
merged 5 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ PRODUCT_EDITION=
# Unless otherwise specified, the latest up-to-date version will be used
# Example:
# RELEASE_VERSION=-7.2.2
RELEASE_VERSION=
RELEASE_VERSION=-8.0.0

# Prefix in the name of your repository in Docker Hub
PREFIX_NAME=docs
Expand Down
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ ENV DOCSERVICE_HOST_PORT=localhost:8000 \
EXAMPLE_HOST_PORT=localhost:3000 \
NGINX_ACCESS_LOG=off \
NGINX_GZIP_PROXIED=off \
NGINX_CLIENT_MAX_BODY_SIZE=100m \
NGINX_WORKER_CONNECTIONS=4096
EXPOSE 8888
RUN yum -y updateinfo && \
Expand Down Expand Up @@ -203,7 +204,7 @@ RUN mkdir -p \
USER ds
ENTRYPOINT docker-entrypoint.sh /var/www/$COMPANY_NAME/documentserver/server/FileConverter/converter

FROM node:buster AS example
FROM node:lts-buster-slim AS example
LABEL maintainer Ascensio System SIA <[email protected]>

ENV LANG=en_US.UTF-8 \
Expand All @@ -214,7 +215,9 @@ ENV LANG=en_US.UTF-8 \

WORKDIR /var/www/onlyoffice/documentserver-example/

RUN git clone \
RUN apt update -y && \
apt install git -y && \
git clone \
--depth 1 \
--recurse-submodules \
https://github.com/ONLYOFFICE/document-server-integration.git && \
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ Below is the complete list of parameters for `onlyoffice/docs-proxy`.
- **EXAMPLE_HOST_PORT**: Defaults to `localhost:3000`.
- **NGINX_ACCESS_LOG**: Defines the nginx config [access_log](https://nginx.org/ru/docs/http/ngx_http_log_module.html#access_log) directive. Defaults to `off`.
- **NGINX_GZIP_PROXIED**: Defines the nginx config [gzip_proxied](https://nginx.org/ru/docs/http/ngx_http_gzip_module.html#gzip_proxied) directive. Defaults to `off`.
- **NGINX_CLIENT_MAX_BODY_SIZE**: Defines the nginx config [client_max_body_size](https://nginx.org/en/docs/http/ngx_http_core_module.html#client_max_body_size) directive. Defaults to `100m`.
- **NGINX_WORKER_CONNECTIONS**: Defines the nginx config [worker_connections](https://nginx.org/en/docs/ngx_core_module.html#worker_connections) directive. Defaults to `4096`.
- **SECURE_LINK_SECRET**: Defines secret for the nginx config directive [secure_link_md5](http://nginx.org/ru/docs/http/ngx_http_secure_link_module.html#secure_link_md5). Defaults to `verysecretstring`.
- **INFO_ALLOWED_IP**: Defines ip addresses for accessing the info page. You can specify multiple values separated by a space.
Expand Down Expand Up @@ -164,6 +165,7 @@ Below is the complete list of parameters for `onlyoffice/docs-docservice`, `only
- **REDIS_SERVER_PWD**: The password set for the Redis account.
- **REDIS_SERVER_DB_NUM**: Number of the redis logical database to be [selected](https://redis.io/commands/select/). Default to `0`.
- **REDIS_SENTINEL_GROUP_NAME**: Name of a group of Redis instances composed of a master and one or more slaves. Default to `mymaster`.
- **REDIS_CLUSTER_NODES**: List of nodes in the Redis cluster. There is no need to specify every node in the cluster, 3 should be enough. You can specify multiple values separated by a space. It must be specified in the `host:port` format.
- **JWT_ENABLED**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Docs. Common for inbox and outbox requests. Defaults to `true`.
- **JWT_ENABLED_INBOX**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Docs only for inbox requests. Default, the value of the variable `JWT_ENABLED` is used.
- **JWT_ENABLED_OUTBOX**: Specifies the enabling the JSON Web Token validation by the ONLYOFFICE Docs only for outbox requests. Default, the value of the variable `JWT_ENABLED` is used.
Expand Down
16 changes: 16 additions & 0 deletions docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,21 @@ case $AMQP_PROTO in
;;
esac

if [[ -n "$REDIS_CLUSTER_NODES" ]]; then
declare -a REDIS_CLUSTER_NODES_ALL=($REDIS_CLUSTER_NODES)
REDIS_CLUSTER_NODES_ARRAY=()
for node in "${REDIS_CLUSTER_NODES_ALL[@]}"; do
REDIS_CLUSTER_NODES_ARRAY+=('{ "url": "redis://'$node'" }')
done
OLD_IFS="$IFS"
IFS=","
NODES=$(echo "${REDIS_CLUSTER_NODES_ARRAY[*]}")
IFS="$OLD_IFS"
REDIS_CLUSTER='"rootNodes": [ '$NODES' ], "defaults": { "username": "'${REDIS_SERVER_USER:-default}'", "password": "'$REDIS_SERVER_PWD'" }'
else
REDIS_CLUSTER=''
fi

export NODE_CONFIG='{
"statsd": {
"useMetrics": '${METRICS_ENABLED:-false}',
Expand All @@ -49,6 +64,7 @@ export NODE_CONFIG='{
"password": "'${REDIS_SERVER_PWD}'",
"db": "'${REDIS_SERVER_DB_NUM:-0}'"
},
"optionsCluster": { '${REDIS_CLUSTER}' },
"iooptions": {
"sentinels": [
{
Expand Down
1 change: 1 addition & 0 deletions proxy-docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ fi
envsubst < /tmp/proxy_nginx/includes/http-upstream.conf > /tmp/http-upstream.conf
envsubst < /etc/nginx/includes/ds-common.conf | tee /tmp/proxy_nginx/includes/ds-common.conf > /dev/null
sed "s,\(set \+\$secure_link_secret\).*,\1 "${SECURE_LINK_SECRET:-verysecretstring}";," -i /tmp/proxy_nginx/conf.d/ds.conf
sed "s/\(client_max_body_size\).*/\1 $NGINX_CLIENT_MAX_BODY_SIZE;/" -i /tmp/proxy_nginx/includes/ds-common.conf
if [[ ! -f "/proc/net/if_inet6" ]]; then
sed '/listen\s\+\[::[0-9]*\].\+/d' -i /tmp/proxy_nginx/conf.d/ds.conf
fi
Expand Down
Loading