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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TO
docker-onlyoffice-documentserver
Commits
be3f7683
Commit
be3f7683
authored
Dec 9, 2016
by
Alexey Golubev
Browse files
Options
Downloads
Patches
Plain Diff
Changed rabbitmq settings
parent
daa1850e
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
README.md
+1
-3
1 addition, 3 deletions
README.md
docker-compose.yml
+1
-3
1 addition, 3 deletions
docker-compose.yml
run-document-server.sh
+45
-8
45 additions, 8 deletions
run-document-server.sh
with
47 additions
and
14 deletions
README.md
+
1
−
3
View file @
be3f7683
...
@@ -153,9 +153,7 @@ Below is the complete list of parameters that can be set using environment varia
...
@@ -153,9 +153,7 @@ 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_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_USER**
: The new user name with superuser permissions for the PostgreSQL account.
-
**POSTGRESQL_SERVER_PASS**
: The password set for the PostgreSQL account.
-
**POSTGRESQL_SERVER_PASS**
: The password set for the PostgreSQL account.
-
**RABBITMQ_SERVER_HOST**
: The IP address or the name of the host where the RabbitMQ server is running.
-
**RABBITMQ_SERVER_URL**
: The
[
AMQP URL
](
http://www.rabbitmq.com/uri-spec.html
"RabbitMQ URI Specification"
)
to connect to RabbitMQ server.
-
**RABBITMQ_SERVER_USER**
: The RabbitMQ server user name.
-
**RABBITMQ_SERVER_PASS**
: The password set for the RabbitMQ account.
-
**REDIS_SERVER_HOST**
: The IP address or the name of the host where the Redis server is running.
-
**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.
-
**REDIS_SERVER_PORT**
: The Redis server port number.
...
...
This diff is collapsed.
Click to expand it.
docker-compose.yml
+
1
−
3
View file @
be3f7683
...
@@ -9,9 +9,7 @@ services:
...
@@ -9,9 +9,7 @@ services:
-
POSTGRESQL_SERVER_PORT=5432
-
POSTGRESQL_SERVER_PORT=5432
-
POSTGRESQL_SERVER_DB_NAME=onlyoffice
-
POSTGRESQL_SERVER_DB_NAME=onlyoffice
-
POSTGRESQL_SERVER_USER=onlyoffice
-
POSTGRESQL_SERVER_USER=onlyoffice
-
RABBITMQ_SERVER_HOST=onlyoffice-rabbitmq
-
RABBITMQ_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq
-
RABBITMQ_SERVER_USER=guest
-
RABBITMQ_SERVER_PASS=guest
-
REDIS_SERVER_HOST=onlyoffice-redis
-
REDIS_SERVER_HOST=onlyoffice-redis
-
REDIS_SERVER_PORT=6379
-
REDIS_SERVER_PORT=6379
stdin_open
:
true
stdin_open
:
true
...
...
This diff is collapsed.
Click to expand it.
run-document-server.sh
+
45
−
8
View file @
be3f7683
...
@@ -37,16 +37,55 @@ read_setting(){
...
@@ -37,16 +37,55 @@ read_setting(){
POSTGRESQL_SERVER_USER
=
${
POSTGRESQL_SERVER_USER
:-
$(
${
JSON
}
services.CoAuthoring.sql.dbUser
)
}
POSTGRESQL_SERVER_USER
=
${
POSTGRESQL_SERVER_USER
:-
$(
${
JSON
}
services.CoAuthoring.sql.dbUser
)
}
POSTGRESQL_SERVER_PASS
=
${
POSTGRESQL_SERVER_PASS
:-
$(
${
JSON
}
services.CoAuthoring.sql.dbPass
)
}
POSTGRESQL_SERVER_PASS
=
${
POSTGRESQL_SERVER_PASS
:-
$(
${
JSON
}
services.CoAuthoring.sql.dbPass
)
}
RABBITMQ_SERVER_URL
=
$(
${
JSON
}
rabbitmq.url
)
RABBITMQ_SERVER_URL
=
${
RABBITMQ_SERVER_URL
:-
$(
${
JSON
}
rabbitmq.url
)
}
RABBITMQ_SERVER_HOST
=
${
RABBITMQ_SERVER_HOST
:-${
RABBITMQ_SERVER_URL
#
'amqp://'
}}
parse_rabbitmq_url
RABBITMQ_SERVER_USER
=
${
RABBITMQ_SERVER_USER
:-
$(
${
JSON
}
rabbitmq.login
)
}
RABBITMQ_SERVER_PASS
=
${
RABBITMQ_SERVER_PASS
:-
$(
${
JSON
}
rabbitmq.password
)
}
RABBITMQ_SERVER_PORT
=
${
RABBITMQ_SERVER_PORT
:-
"5672"
}
REDIS_SERVER_HOST
=
${
REDIS_SERVER_HOST
:-
$(
${
JSON
}
services.CoAuthoring.redis.host
)
}
REDIS_SERVER_HOST
=
${
REDIS_SERVER_HOST
:-
$(
${
JSON
}
services.CoAuthoring.redis.host
)
}
REDIS_SERVER_PORT
=
${
REDIS_SERVER_PORT
:-
$(
${
JSON
}
services.CoAuthoring.redis.port
)
}
REDIS_SERVER_PORT
=
${
REDIS_SERVER_PORT
:-
$(
${
JSON
}
services.CoAuthoring.redis.port
)
}
}
}
parse_rabbitmq_url
(){
local
amqp
=
${
RABBITMQ_SERVER_URL
}
# extract the protocol
local
proto
=
"
$(
echo
$amqp
|
grep
:// |
sed
-e
's,^\(.*://\).*,\1,g'
)
"
# remove the protocol
local
url
=
"
$(
echo
${
amqp
/
$proto
/
}
)
"
# extract the user and password (if any)
local
userpass
=
"
`
echo
$url
|
grep
@ |
cut
-d
@
-f1
`
"
local
pass
=
`
echo
$userpass
|
grep
: |
cut
-d
:
-f2
`
local
user
if
[
-n
"
$pass
"
]
;
then
user
=
`
echo
$userpass
|
grep
: |
cut
-d
:
-f1
`
else
user
=
$userpass
fi
echo
$user
# extract the host
local
hostport
=
"
$(
echo
${
url
/
$userpass
@/
}
|
cut
-d
/
-f1
)
"
# by request - try to extract the port
local
port
=
"
$(
echo
$hostport
|
sed
-e
's,^.*:,:,g'
-e
's,.*:\([0-9]*\).*,\1,g'
-e
's,[^0-9],,g'
)
"
local
host
if
[
-n
"
$port
"
]
;
then
host
=
`
echo
$hostport
|
grep
: |
cut
-d
:
-f1
`
else
host
=
$hostport
port
=
"5672"
fi
# extract the path (if any)
local
path
=
"
$(
echo
$url
|
grep
/ |
cut
-d
/
-f2-
)
"
RABBITMQ_SERVER_HOST
=
$host
RABBITMQ_SERVER_USER
=
$user
RABBITMQ_SERVER_PASS
=
$pass
RABBITMQ_SERVER_PORT
=
$port
}
waiting_for_connection
(){
waiting_for_connection
(){
until
nc
-z
-w
3
"
$1
"
"
$2
"
;
do
until
nc
-z
-w
3
"
$1
"
"
$2
"
;
do
>
&2
echo
"Waiting for connection to the
$1
host on port
$2
"
>
&2
echo
"Waiting for connection to the
$1
host on port
$2
"
...
@@ -77,9 +116,7 @@ update_postgresql_settings(){
...
@@ -77,9 +116,7 @@ update_postgresql_settings(){
}
}
update_rabbitmq_setting
(){
update_rabbitmq_setting
(){
${
JSON
}
-I
-e
"this.rabbitmq.url = 'amqp://
${
RABBITMQ_SERVER_HOST
}
'"
${
JSON
}
-I
-e
"this.rabbitmq.url = '
${
RABBITMQ_SERVER_URL
}
'"
${
JSON
}
-I
-e
"this.rabbitmq.login = '
${
RABBITMQ_SERVER_USER
}
'"
${
JSON
}
-I
-e
"this.rabbitmq.password = '
${
RABBITMQ_SERVER_PASS
}
'"
}
}
update_redis_settings
(){
update_redis_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