Skip to content

Commit

Permalink
Merge pull request #155 from ONLYOFFICE/release/v12.0
Browse files Browse the repository at this point in the history
Merge release/v12.0 into master
  • Loading branch information
agolybev authored May 26, 2022
2 parents 21079d5 + 7975f48 commit 46e624d
Show file tree
Hide file tree
Showing 7 changed files with 152 additions and 56 deletions.
29 changes: 26 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ ARG SOURCE_REPO_URL="deb http://static.teamlab.com.s3.amazonaws.com/repo/debian
ARG DEBIAN_FRONTEND=noninteractive
ARG PACKAGE_SYSNAME="onlyoffice"

ARG LOG4J_VER=2.17.2
ARG LOG4J_BIN=apache-log4j-${LOG4J_VER}-bin
ARG LOG4J_ARCH=${LOG4J_BIN}.tar.gz
ARG LOG4J_DIR=./log4j

ARG ELK_DIR=/usr/share/elasticsearch
ARG ELK_LIB_DIR=${ELK_DIR}/lib
ARG ELK_MODULE_DIR=${ELK_DIR}/modules

LABEL ${PACKAGE_SYSNAME}.community.release-date="${RELEASE_DATE}" \
${PACKAGE_SYSNAME}.community.version="${VERSION}" \
description="Community Server is a free open-source collaborative system developed to manage documents, projects, customer relationship and emails, all in one place." \
Expand All @@ -15,7 +24,8 @@ LABEL ${PACKAGE_SYSNAME}.community.release-date="${RELEASE_DATE}" \

ENV LANG=en_US.UTF-8 \
LANGUAGE=en_US:en \
LC_ALL=en_US.UTF-8
LC_ALL=en_US.UTF-8 \
ELASTICSEARCH_VERSION=7.10.0

RUN apt-get -y update && \
apt-get -y upgrade && \
Expand Down Expand Up @@ -55,6 +65,8 @@ RUN apt-get -y update && \
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | tee -a /etc/apt/sources.list.d/elastic-7.x.list && \
add-apt-repository -y ppa:certbot/certbot && \
add-apt-repository -y ppa:chris-lea/redis-server && \
curl -sSL https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
echo "deb [arch=amd64] https://packages.microsoft.com/ubuntu/18.04/prod bionic main" >> /etc/apt/sources.list.d/microsoft-prod.list && \
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash - && \
apt-get install -yq gnupg2 \
ca-certificates \
Expand All @@ -78,12 +90,23 @@ RUN apt-get -y update && \
iproute2 \
ffmpeg \
jq \
openjdk-8-jre-headless \
apt-transport-https \
elasticsearch=7.9.0 \
elasticsearch=${ELASTICSEARCH_VERSION} \
mono-webserver-hyperfastcgi=0.4-7 \
dotnet-sdk-6.0 \
${PACKAGE_SYSNAME}-communityserver \
${PACKAGE_SYSNAME}-xmppserver && \
rm -v ${ELK_LIB_DIR}/log4j-*.jar ${ELK_MODULE_DIR}/*/log4j-*.jar && \
wget https://dlcdn.apache.org/logging/log4j/${LOG4J_VER}/${LOG4J_ARCH}&& \
mkdir ${LOG4J_DIR} && \
tar -xf ${LOG4J_ARCH} -C ${LOG4J_DIR} && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-api-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-core-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-1.2-api-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-core && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-identity-provider && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-security && \
rm -vr ${LOG4J_ARCH} ${LOG4J_DIR} && \
zip -q -d ${ELK_LIB_DIR}/log4j-core-*.jar org/apache/logging/log4j/core/lookup/JndiLookup.class && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

Expand Down
20 changes: 0 additions & 20 deletions Dockerfile.ami
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,6 @@ FROM onlyoffice/communityserver:latest AS communityserver-ami
ARG APPSETTING_CONFIG=/var/www/onlyoffice/WebStudio/web.appsettings.config
ARG RESOURCE_SQL=/var/www/onlyoffice/Sql/onlyoffice.resources.sql

ARG LOG4J_VER=2.17.1
ARG LOG4J_BIN=apache-log4j-${LOG4J_VER}-bin
ARG LOG4J_ARCH=${LOG4J_BIN}.tar.gz
ARG LOG4J_DIR=./log4j

ARG ELK_DIR=/usr/share/elasticsearch
ARG ELK_LIB_DIR=${ELK_DIR}/lib
ARG ELK_MODULE_DIR=${ELK_DIR}/modules

RUN rm -v ${ELK_LIB_DIR}/log4j-*.jar ${ELK_MODULE_DIR}/*/log4j-*.jar && \
wget https://dlcdn.apache.org/logging/log4j/${LOG4J_VER}/${LOG4J_ARCH}&& \
mkdir ${LOG4J_DIR} && \
tar -xf ${LOG4J_ARCH} -C ${LOG4J_DIR} && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-api-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-core-${LOG4J_VER}.jar ${ELK_LIB_DIR} && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-1.2-api-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-core && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-identity-provider && \
cp -v ${LOG4J_DIR}/${LOG4J_BIN}/log4j-slf4j-impl-${LOG4J_VER}.jar ${ELK_MODULE_DIR}/x-pack-security && \
rm -vr ${LOG4J_ARCH} ${LOG4J_DIR}

RUN apt-get -y update && \
apt-get install -yq xmlstarlet

Expand Down
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ sudo docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-mys

Use this command to install **ONLYOFFICE Community Server**:
```
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
Expand All @@ -171,7 +171,7 @@ sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name o
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
onlyoffice/communityserver
```

Expand All @@ -186,23 +186,23 @@ All the data are stored in the specially-designated directories, **data volumes*

To get access to your data from outside the container, you need to mount the volumes. It can be done by specifying the '-v' option in the docker run command.

sudo docker run -i -t -d -p 80:80 \
sudo docker run -i -t -d -p 80:80 --cgroupns=host \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

Storing the data on the host machine allows you to easily update ONLYOFFICE once the new version is released without losing your data.

### Running ONLYOFFICE Community Server on Different Port

To change the port, use the -p command. E.g.: to make your portal accessible via port 8080 execute the following command:

sudo docker run -i -t -d --privileged -p 8080:80 \
sudo docker run -i -t -d --privileged -p 8080:80 --cgroupns=host \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

### Exposing Additional Ports

Expand All @@ -214,11 +214,11 @@ The container ports to be exposed for **incoming connections** are the folloing:

You can expose ports by specifying the '-p' option in the docker run command.

sudo docker run -i -t -d --privileged -p 80:80 -p 443:443 -p 5222:5222 \
sudo docker run -i -t -d --privileged -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver


For **outgoing connections** you need to expose the following ports:
Expand Down Expand Up @@ -397,7 +397,7 @@ docker run --net onlyoffice -i -t -d --restart=always --name onlyoffice-control-
**STEP 6**: Install ONLYOFFICE Community Server

```bash
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 \
sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name onlyoffice-community-server -p 80:80 -p 443:443 -p 5222:5222 --cgroupns=host \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
Expand All @@ -415,7 +415,7 @@ sudo docker run --net onlyoffice -i -t -d --privileged --restart=always --name o
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro \
-v /sys/fs/cgroup:/sys/fs/cgroup:rw \
onlyoffice/communityserver
```
Where `${MAIL_SERVER_IP}` is the IP address for **ONLYOFFICE Mail Server**. You can easily get it using the command:
Expand Down Expand Up @@ -480,7 +480,7 @@ where

**STEP 4** Run the new image with the same map paths

sudo docker run -i -t -d --privileged -p 80:80 \
sudo docker run -i -t -d --privileged -p 80:80 --cgroupns=host \
-e MYSQL_SERVER_ROOT_PASSWORD=my-secret-pw \
-e MYSQL_SERVER_DB_NAME=onlyoffice \
-e MYSQL_SERVER_HOST=onlyoffice-mysql-server \
Expand All @@ -489,7 +489,7 @@ where
-v /app/onlyoffice/CommunityServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/CommunityServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/CommunityServer/letsencrypt:/etc/letsencrypt \
-v /sys/fs/cgroup:/sys/fs/cgroup:ro onlyoffice/communityserver
-v /sys/fs/cgroup:/sys/fs/cgroup:rw onlyoffice/communityserver

*This will update **Community Server** container only and will not connect **Document Server** and **Mail Server** to it. You will need to use the additional parameters (like those used during installation) to connect them.*

Expand Down
32 changes: 30 additions & 2 deletions docker-compose.groups.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ services:
- mysql_data:/var/lib/mysql
onlyoffice-community-server:
container_name: onlyoffice-community-server
image: onlyoffice/communityserver:11.0.0.1458
image: onlyoffice/communityserver:11.5.4.1582
depends_on:
- onlyoffice-mysql-server
- onlyoffice-elasticsearch
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
- CONTROL_PANEL_PORT_80_TCP=80
Expand All @@ -28,6 +29,8 @@ services:
- MYSQL_SERVER_HOST=onlyoffice-mysql-server
- MYSQL_SERVER_USER=onlyoffice_user
- MYSQL_SERVER_PASS=onlyoffice_pass
- ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch
- ELASTICSEARCH_SERVER_HTTPPORT=9200
networks:
- onlyoffice
ports:
Expand All @@ -44,11 +47,35 @@ services:
- community_letsencrypt:/etc/letsencrypt
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ./certs:/var/www/onlyoffice/Data/certs
onlyoffice-elasticsearch:
image: onlyoffice/elasticsearch:7.10.0
container_name: onlyoffice-elasticsearch
restart: always
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true"
- "indices.fielddata.cache.size=30%"
- "indices.memory.index_buffer_size=30%"
networks:
- onlyoffice
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65535
hard: 65535
volumes:
- es_data:/usr/share/elasticsearch/data
expose:
- "9200"
- "9300"
onlyoffice-control-panel:
container_name: onlyoffice-control-panel
depends_on:
- onlyoffice-community-server
image: onlyoffice/controlpanel:2.9.0.351
image: onlyoffice/controlpanel:3.0.2.395
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
expose:
Expand All @@ -74,3 +101,4 @@ volumes:
controlpanel_data:
controlpanel_log:
mysql_data:
es_data:
34 changes: 31 additions & 3 deletions docker-compose.workspace.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ services:
- mysql_data:/var/lib/mysql
onlyoffice-community-server:
container_name: onlyoffice-community-server
image: onlyoffice/communityserver:11.0.0.1458
image: onlyoffice/communityserver:11.5.4.1582
depends_on:
- onlyoffice-mysql-server
- onlyoffice-document-server
- onlyoffice-mail-server
- onlyoffice-elasticsearch
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
- CONTROL_PANEL_PORT_80_TCP=80
Expand All @@ -41,6 +42,8 @@ services:
- MAIL_SERVER_DB_NAME=onlyoffice_mailserver
- MAIL_SERVER_DB_USER=onlyoffice_mailserver_user
- MAIL_SERVER_DB_PASS=onlyoffice_mailserver_user_pass
- ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch
- ELASTICSEARCH_SERVER_HTTPPORT=9200
networks:
- onlyoffice
ports:
Expand All @@ -58,9 +61,33 @@ services:
- document_data:/var/www/onlyoffice/DocumentServerData
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ./certs:/var/www/onlyoffice/Data/certs
onlyoffice-elasticsearch:
image: onlyoffice/elasticsearch:7.10.0
container_name: onlyoffice-elasticsearch
restart: always
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true"
- "indices.fielddata.cache.size=30%"
- "indices.memory.index_buffer_size=30%"
networks:
- onlyoffice
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65535
hard: 65535
volumes:
- es_data:/usr/share/elasticsearch/data
expose:
- "9200"
- "9300"
onlyoffice-document-server:
container_name: onlyoffice-document-server
image: onlyoffice/documentserver:6.0.2
image: onlyoffice/documentserver:6.4.2.6
stdin_open: true
tty: true
restart: always
Expand Down Expand Up @@ -110,7 +137,7 @@ services:
- onlyoffice-document-server
- onlyoffice-mail-server
- onlyoffice-community-server
image: onlyoffice/controlpanel:2.9.0.351
image: onlyoffice/controlpanel:3.0.2.395
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
expose:
Expand Down Expand Up @@ -143,3 +170,4 @@ volumes:
controlpanel_data:
controlpanel_log:
mysql_data:
es_data:
34 changes: 31 additions & 3 deletions docker-compose.workspace_enterprise.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@ services:
- mysql_data:/var/lib/mysql
onlyoffice-community-server:
container_name: onlyoffice-community-server
image: onlyoffice/communityserver:11.0.0.1458
image: onlyoffice/communityserver:11.5.4.1582
depends_on:
- onlyoffice-mysql-server
- onlyoffice-document-server
- onlyoffice-mail-server
- onlyoffice-elasticsearch
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
- CONTROL_PANEL_PORT_80_TCP=80
Expand All @@ -41,6 +42,8 @@ services:
- MAIL_SERVER_DB_NAME=onlyoffice_mailserver
- MAIL_SERVER_DB_USER=onlyoffice_mailserver_user
- MAIL_SERVER_DB_PASS=onlyoffice_mailserver_user_pass
- ELASTICSEARCH_SERVER_HOST=onlyoffice-elasticsearch
- ELASTICSEARCH_SERVER_HTTPPORT=9200
networks:
- onlyoffice
ports:
Expand All @@ -58,9 +61,33 @@ services:
- document_data:/var/www/onlyoffice/DocumentServerData
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- ./certs:/var/www/onlyoffice/Data/certs
onlyoffice-elasticsearch:
image: onlyoffice/elasticsearch:7.10.0
container_name: onlyoffice-elasticsearch
restart: always
environment:
- discovery.type=single-node
- bootstrap.memory_lock=true
- "ES_JAVA_OPTS=-Xms512m -Xmx512m -Dlog4j2.formatMsgNoLookups=true"
- "indices.fielddata.cache.size=30%"
- "indices.memory.index_buffer_size=30%"
networks:
- onlyoffice
ulimits:
memlock:
soft: -1
hard: -1
nofile:
soft: 65535
hard: 65535
volumes:
- es_data:/usr/share/elasticsearch/data
expose:
- "9200"
- "9300"
onlyoffice-document-server:
container_name: onlyoffice-document-server
image: onlyoffice/documentserver-ee:6.0.2
image: onlyoffice/documentserver-ee:6.4.2.6
stdin_open: true
tty: true
restart: always
Expand Down Expand Up @@ -110,7 +137,7 @@ services:
- onlyoffice-document-server
- onlyoffice-mail-server
- onlyoffice-community-server
image: onlyoffice/controlpanel:2.9.0.351
image: onlyoffice/controlpanel:3.0.2.395
environment:
- ONLYOFFICE_CORE_MACHINEKEY=core_secret
expose:
Expand Down Expand Up @@ -143,3 +170,4 @@ volumes:
controlpanel_data:
controlpanel_log:
mysql_data:
es_data:
Loading

0 comments on commit 46e624d

Please sign in to comment.