Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
docker-onlyoffice-documentserver
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TO
docker-onlyoffice-documentserver
Commits
3f7630c3
Commit
3f7630c3
authored
5 years ago
by
Alexey Golubev
Browse files
Options
Downloads
Plain Diff
v5.3.0
parents
10d54591
2d6a4e09
No related branches found
No related tags found
No related merge requests found
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
README.md
+6
-3
6 additions, 3 deletions
README.md
activemq.yml
+31
-0
31 additions, 0 deletions
activemq.yml
docker-compose.yml
+1
-1
1 addition, 1 deletion
docker-compose.yml
run-document-server.sh
+58
-19
58 additions, 19 deletions
run-document-server.sh
with
96 additions
and
23 deletions
README.md
+
6
−
3
View file @
3f7630c3
...
...
@@ -167,7 +167,8 @@ Below is the complete list of parameters that can be set using environment varia
-
**POSTGRESQL_SERVER_DB_NAME**
: The name of a PostgreSQL database to be created on the image startup.
-
**POSTGRESQL_SERVER_USER**
: The new user name with superuser permissions for the PostgreSQL account.
-
**POSTGRESQL_SERVER_PASS**
: The password set for the PostgreSQL account.
-
**RABBITMQ_SERVER_URL**
: The
[
AMQP URL
](
http://www.rabbitmq.com/uri-spec.html
"RabbitMQ URI Specification"
)
to connect to RabbitMQ server.
-
**AMQP_SERVER_URL**
: The
[
AMQP URL
](
http://www.rabbitmq.com/uri-spec.html
"RabbitMQ URI Specification"
)
to connect to message broker server.
-
**AMQP_SERVER_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.
-
**NGINX_WORKER_PROCESSES**
: Defines the number of nginx worker processes.
...
...
@@ -294,7 +295,7 @@ Please note, that both executing the script and disconnecting users may take a l
## Project Information
Official website:
[
http://www.onlyoffice.
org
](
http://onlyoffice.
org
"http://www.onlyoffice.org"
)
Official website:
[
http
s
://www.onlyoffice.
com
](
http
s
://
www.
onlyoffice.
com/?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS
)
Code repository:
[
https://github.com/ONLYOFFICE/DocumentServer
](
https://github.com/ONLYOFFICE/DocumentServer
"https://github.com/ONLYOFFICE/DocumentServer"
)
...
...
@@ -302,7 +303,9 @@ Docker Image: [https://github.com/ONLYOFFICE/Docker-DocumentServer](https://gith
License:
[
GNU AGPL v3.0
](
https://help.onlyoffice.com/products/files/doceditor.aspx?fileid=4358397&doc=K0ZUdlVuQzQ0RFhhMzhZRVN4ZFIvaHlhUjN2eS9XMXpKR1M5WEppUk1Gcz0_IjQzNTgzOTci0
"GNU AGPL v3.0"
)
SaaS version:
[
http://www.onlyoffice.com
](
http://www.onlyoffice.com
"http://www.onlyoffice.com"
)
Free version vs commercial builds comparison: https://github.com/ONLYOFFICE/DocumentServer#onlyoffice-document-server-editions
SaaS version:
[
https://www.onlyoffice.com/cloud-office.aspx
](
https://www.onlyoffice.com/cloud-office.aspx?utm_source=github&utm_medium=cpc&utm_campaign=GitHubDockerDS
)
## User Feedback and Support
...
...
This diff is collapsed.
Click to expand it.
activemq.yml
0 → 100644
+
31
−
0
View file @
3f7630c3
version
:
'
2'
services
:
onlyoffice-documentserver
:
container_name
:
onlyoffice-documentserver
image
:
onlyoffice/4testing-documentserver-ie:latest
environment
:
-
AMQP_SERVER_URL=amqp://guest:guest@onlyoffice-activemq
-
AMQP_SERVER_TYPE=activemq
stdin_open
:
true
restart
:
always
ports
:
-
'
80:80'
-
'
443:443'
networks
:
-
onlyoffice
onlyoffice-activemq
:
container_name
:
onlyoffice-activemq
image
:
webcenter/activemq:5.14.3
environment
:
-
ACTIVEMQ_USERS_guest=guest
-
ACTIVEMQ_GROUPS_owners=guest
restart
:
always
networks
:
-
onlyoffice
expose
:
-
'
5672'
networks
:
onlyoffice
:
driver
:
'
bridge'
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
1
View file @
3f7630c3
...
...
@@ -9,7 +9,7 @@ services:
-
POSTGRESQL_SERVER_PORT=5432
-
POSTGRESQL_SERVER_DB_NAME=onlyoffice
-
POSTGRESQL_SERVER_USER=onlyoffice
-
RABBIT
MQ_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq
-
A
MQ
P
_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq
-
REDIS_SERVER_HOST=onlyoffice-redis
-
REDIS_SERVER_PORT=6379
stdin_open
:
true
...
...
This diff is collapsed.
Click to expand it.
run-document-server.sh
+
58
−
19
View file @
3f7630c3
...
...
@@ -26,9 +26,9 @@ SYSCONF_TEMPLATES_DIR="/app/onlyoffice/setup/config"
NGINX_CONFD_PATH
=
"/etc/nginx/conf.d"
;
NGINX_ONLYOFFICE_PATH
=
"
${
CONF_DIR
}
/nginx"
NGINX_ONLYOFFICE_CONF
=
"
${
NGINX_ONLYOFFICE_PATH
}
/
onlyoffice-documentserver
.conf"
NGINX_ONLYOFFICE_CONF
=
"
${
NGINX_ONLYOFFICE_PATH
}
/
ds
.conf"
NGINX_ONLYOFFICE_EXAMPLE_PATH
=
"
${
CONF_DIR
}
-example/nginx"
NGINX_ONLYOFFICE_EXAMPLE_CONF
=
"
${
NGINX_ONLYOFFICE_EXAMPLE_PATH
}
/includes/
onlyoffice-documentserver
-example.conf"
NGINX_ONLYOFFICE_EXAMPLE_CONF
=
"
${
NGINX_ONLYOFFICE_EXAMPLE_PATH
}
/includes/
ds
-example.conf"
NGINX_CONFIG_PATH
=
"/etc/nginx/nginx.conf"
NGINX_WORKER_PROCESSES
=
${
NGINX_WORKER_PROCESSES
:-
1
}
...
...
@@ -42,9 +42,10 @@ ONLYOFFICE_DEFAULT_CONFIG=${CONF_DIR}/local.json
ONLYOFFICE_LOG4JS_CONFIG
=
${
CONF_DIR
}
/log4js/production.json
ONLYOFFICE_EXAMPLE_CONFIG
=
${
CONF_DIR
}
-example
/local.json
JSON
=
"json -q -f
${
ONLYOFFICE_DEFAULT_CONFIG
}
"
JSON_LOG
=
"json -q -f
${
ONLYOFFICE_LOG4JS_CONFIG
}
"
JSON_EXAMPLE
=
"json -q -f
${
ONLYOFFICE_EXAMPLE_CONFIG
}
"
JSON_BIN
=
${
APP_DIR
}
/npm/node_modules/.bin/json
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
}
"
LOCAL_SERVICES
=()
...
...
@@ -62,7 +63,9 @@ read_setting(){
POSTGRESQL_SERVER_PASS
=
${
POSTGRESQL_SERVER_PASS
:-
$(
${
JSON
}
services.CoAuthoring.sql.dbPass
)
}
RABBITMQ_SERVER_URL
=
${
RABBITMQ_SERVER_URL
:-
$(
${
JSON
}
rabbitmq.url
)
}
parse_rabbitmq_url
AMQP_SERVER_URL
=
${
AMQP_SERVER_URL
:-${
RABBITMQ_SERVER_URL
}}
AMQP_SERVER_TYPE
=
${
AMQP_SERVER_TYPE
:-
rabbitmq
}
parse_rabbitmq_url
${
AMQP_SERVER_URL
}
REDIS_SERVER_HOST
=
${
REDIS_SERVER_HOST
:-
$(
${
JSON
}
services.CoAuthoring.redis.host
)
}
REDIS_SERVER_PORT
=
${
REDIS_SERVER_PORT
:-
6379
}
...
...
@@ -71,7 +74,7 @@ read_setting(){
}
parse_rabbitmq_url
(){
local
amqp
=
$
{
RABBITMQ_SERVER_URL
}
local
amqp
=
$
1
# extract the protocol
local
proto
=
"
$(
echo
$amqp
|
grep
:// |
sed
-e
's,^\(.*://\).*,\1,g'
)
"
...
...
@@ -105,10 +108,10 @@ parse_rabbitmq_url(){
# extract the path (if any)
local
path
=
"
$(
echo
$url
|
grep
/ |
cut
-d
/
-f2-
)
"
RABBIT
MQ_SERVER_HOST
=
$host
RABBIT
MQ_SERVER_USER
=
$user
RABBIT
MQ_SERVER_PASS
=
$pass
RABBIT
MQ_SERVER_PORT
=
$port
A
MQ
P
_SERVER_HOST
=
$host
A
MQ
P
_SERVER_USER
=
$user
A
MQ
P
_SERVER_PASS
=
$pass
A
MQ
P
_SERVER_PORT
=
$port
}
waiting_for_connection
(){
...
...
@@ -122,8 +125,8 @@ waiting_for_postgresql(){
waiting_for_connection
${
POSTGRESQL_SERVER_HOST
}
${
POSTGRESQL_SERVER_PORT
}
}
waiting_for_
rabbit
mq
(){
waiting_for_connection
${
RABBIT
MQ_SERVER_HOST
}
${
RABBIT
MQ_SERVER_PORT
}
waiting_for_
a
mq
p
(){
waiting_for_connection
${
A
MQ
P
_SERVER_HOST
}
${
A
MQ
P
_SERVER_PORT
}
}
waiting_for_redis
(){
...
...
@@ -141,7 +144,38 @@ update_postgresql_settings(){
}
update_rabbitmq_setting
(){
if
[
"
${
AMQP_SERVER_TYPE
}
"
==
"rabbitmq"
]
;
then
${
JSON
}
-I
-e
"if(this.queue===undefined)this.queue={};"
${
JSON
}
-I
-e
"this.queue.type = 'rabbitmq'"
${
JSON
}
-I
-e
"this.rabbitmq.url = '
${
RABBITMQ_SERVER_URL
}
'"
fi
if
[
"
${
AMQP_SERVER_TYPE
}
"
==
"activemq"
]
;
then
${
JSON
}
-I
-e
"if(this.queue===undefined)this.queue={};"
${
JSON
}
-I
-e
"this.queue.type = 'activemq'"
${
JSON
}
-I
-e
"if(this.activemq===undefined)this.activemq={};"
${
JSON
}
-I
-e
"if(this.activemq.connectOptions===undefined)this.activemq.connectOptions={};"
${
JSON
}
-I
-e
"this.activemq.connectOptions.host = '
${
AMQP_SERVER_HOST
}
'"
if
[
!
"
${
AMQP_SERVER_PORT
}
"
==
""
]
;
then
${
JSON
}
-I
-e
"this.activemq.connectOptions.port = '
${
AMQP_SERVER_PORT
}
'"
else
${
JSON
}
-I
-e
"delete this.activemq.connectOptions.port"
fi
if
[
!
"
${
AMQP_SERVER_USER
}
"
==
""
]
;
then
${
JSON
}
-I
-e
"this.activemq.connectOptions.username = '
${
AMQP_SERVER_USER
}
'"
else
${
JSON
}
-I
-e
"delete this.activemq.connectOptions.username"
fi
if
[
!
"
${
AMQP_SERVER_PASS
}
"
==
""
]
;
then
${
JSON
}
-I
-e
"this.activemq.connectOptions.password = '
${
AMQP_SERVER_PASS
}
'"
else
${
JSON
}
-I
-e
"delete this.activemq.connectOptions.password"
fi
fi
}
update_redis_settings
(){
...
...
@@ -212,7 +246,7 @@ update_nginx_settings(){
# setup HTTPS
if
[
-f
"
${
SSL_CERTIFICATE_PATH
}
"
-a
-f
"
${
SSL_KEY_PATH
}
"
]
;
then
cp
-f
${
NGINX_ONLYOFFICE_PATH
}
/
onlyoffice-documentserver
-ssl.conf.t
e
mpl
ate
${
NGINX_ONLYOFFICE_CONF
}
cp
-f
${
NGINX_ONLYOFFICE_PATH
}
/
ds
-ssl.conf.tmpl
${
NGINX_ONLYOFFICE_CONF
}
# configure nginx
sed
's,{{SSL_CERTIFICATE_PATH}},'
"
${
SSL_CERTIFICATE_PATH
}
"
','
-i
${
NGINX_ONLYOFFICE_CONF
}
...
...
@@ -240,7 +274,12 @@ update_nginx_settings(){
sed
'/max-age=/d'
-i
${
NGINX_ONLYOFFICE_CONF
}
fi
else
ln
-sf
${
NGINX_ONLYOFFICE_PATH
}
/onlyoffice-documentserver.conf.template
${
NGINX_ONLYOFFICE_CONF
}
ln
-sf
${
NGINX_ONLYOFFICE_PATH
}
/ds.conf.tmpl
${
NGINX_ONLYOFFICE_CONF
}
fi
# check if ipv6 supported otherwise remove it from nginx config
if
[
!
-f
/proc/net/if_inet6
]
;
then
sed
'/listen\s\+\[::[0-9]*\].\+/d'
-i
$NGINX_ONLYOFFICE_CONF
fi
if
[
-f
"
${
NGINX_ONLYOFFICE_EXAMPLE_CONF
}
"
]
;
then
...
...
@@ -272,7 +311,7 @@ mkdir -p ${DS_LOG_DIR}-example
# change folder rights
for
i
in
${
LOG_DIR
}
${
LIB_DIR
}
${
DATA_DIR
}
;
do
chown
-R
onlyoffice:onlyoffice
"
$i
"
chown
-R
ds:ds
"
$i
"
chmod
-R
755
"
$i
"
done
...
...
@@ -302,7 +341,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
LOCAL_SERVICES+
=(
"postgresql"
)
fi
if
[
${
RABBIT
MQ_SERVER_HOST
}
!=
"localhost"
]
;
then
if
[
${
A
MQ
P
_SERVER_HOST
}
!=
"localhost"
]
;
then
update_rabbitmq_setting
else
LOCAL_SERVICES+
=(
"rabbitmq-server"
)
...
...
@@ -336,7 +375,7 @@ fi
if
[
${
ONLYOFFICE_DATA_CONTAINER
}
!=
"true"
]
;
then
waiting_for_postgresql
waiting_for_
rabbit
mq
waiting_for_
a
mq
p
waiting_for_redis
update_nginx_settings
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment