Rename AMQP variables (#205)
This commit is contained in:
parent
ee8fa827e3
commit
08bb07e2d0
8 changed files with 84 additions and 15 deletions
14
.travis.yml
14
.travis.yml
|
@ -30,8 +30,18 @@ env:
|
|||
|
||||
# activemq
|
||||
- config: activemq.yml
|
||||
AMQP_SERVER_TYPE: activemq
|
||||
AMQP_SERVER_URL: amqp://guest:guest@onlyoffice-activemq
|
||||
AMQP_TYPE: activemq
|
||||
AMQP_URI: amqp://guest:guest@onlyoffice-activemq
|
||||
|
||||
# rabbitmq
|
||||
- config: rabbitmq.yml
|
||||
AMQP_TYPE: rabbitmq
|
||||
AMQP_URI: amqp://guest:guest@onlyoffice-rabbitmq
|
||||
|
||||
# rabbitmq old variables
|
||||
- config: rabbitmq-old.yml
|
||||
AMQP_SERVER_TYPE: rabbitmq
|
||||
AMQP_SERVER_URL: amqp://guest:guest@onlyoffice-rabbitmq
|
||||
|
||||
services:
|
||||
- docker
|
||||
|
|
|
@ -170,8 +170,8 @@ Below is the complete list of parameters that can be set using environment varia
|
|||
- **DB_NAME**: The name of a database to be created on the image startup.
|
||||
- **DB_USER**: The new user name with superuser permissions for the database account.
|
||||
- **DB_PWD**: The password set for the database account.
|
||||
- **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`.
|
||||
- **AMQP_URI**: The [AMQP URI](http://www.rabbitmq.com/uri-spec.html "RabbitMQ URI Specification") to connect to message broker server.
|
||||
- **AMQP_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.
|
||||
|
|
|
@ -10,7 +10,7 @@ services:
|
|||
- DB_PORT=5432
|
||||
- DB_NAME=onlyoffice
|
||||
- DB_USER=onlyoffice
|
||||
- AMQP_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq
|
||||
- AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
|
||||
- REDIS_SERVER_HOST=onlyoffice-redis
|
||||
- REDIS_SERVER_PORT=6379
|
||||
# Uncomment strings below to enable the JSON Web Token validation.
|
||||
|
|
|
@ -66,6 +66,9 @@ read_setting(){
|
|||
deprecated_var POSTGRESQL_SERVER_DB_NAME DB_NAME
|
||||
deprecated_var POSTGRESQL_SERVER_USER DB_USER
|
||||
deprecated_var POSTGRESQL_SERVER_PASS DB_PWD
|
||||
deprecated_var RABBITMQ_SERVER_URL AMQP_URI
|
||||
deprecated_var AMQP_SERVER_URL AMQP_URI
|
||||
deprecated_var AMQP_SERVER_TYPE AMQP_TYPE
|
||||
|
||||
DB_HOST=${DB_HOST:-${POSTGRESQL_SERVER_HOST:-$(${JSON} services.CoAuthoring.sql.dbHost)}}
|
||||
case $DB_TYPE in
|
||||
|
@ -89,9 +92,9 @@ read_setting(){
|
|||
DB_TYPE=${DB_TYPE:-$(${JSON} services.CoAuthoring.sql.type)}
|
||||
|
||||
RABBITMQ_SERVER_URL=${RABBITMQ_SERVER_URL:-$(${JSON} rabbitmq.url)}
|
||||
AMQP_SERVER_URL=${AMQP_SERVER_URL:-${RABBITMQ_SERVER_URL}}
|
||||
AMQP_SERVER_TYPE=${AMQP_SERVER_TYPE:-rabbitmq}
|
||||
parse_rabbitmq_url ${AMQP_SERVER_URL}
|
||||
AMQP_URI=${AMQP_URI:-${AMQP_SERVER_URL:-${RABBITMQ_SERVER_URL}}}
|
||||
AMQP_TYPE=${AMQP_TYPE:-${AMQP_SERVER_TYPE:-rabbitmq}}
|
||||
parse_rabbitmq_url ${AMQP_URI}
|
||||
|
||||
REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-$(${JSON} services.CoAuthoring.redis.host)}
|
||||
REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379}
|
||||
|
@ -178,13 +181,13 @@ update_db_settings(){
|
|||
}
|
||||
|
||||
update_rabbitmq_setting(){
|
||||
if [ "${AMQP_SERVER_TYPE}" == "rabbitmq" ]; then
|
||||
if [ "${AMQP_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 = '${AMQP_SERVER_URL}'"
|
||||
${JSON} -I -e "this.rabbitmq.url = '${AMQP_URI}'"
|
||||
fi
|
||||
|
||||
if [ "${AMQP_SERVER_TYPE}" == "activemq" ]; then
|
||||
if [ "${AMQP_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={};"
|
||||
|
|
|
@ -4,8 +4,8 @@ services:
|
|||
container_name: onlyoffice-documentserver
|
||||
image: onlyoffice/4testing-documentserver-ie:latest
|
||||
environment:
|
||||
- AMQP_SERVER_TYPE
|
||||
- AMQP_SERVER_URL
|
||||
- AMQP_TYPE
|
||||
- AMQP_URI
|
||||
stdin_open: true
|
||||
restart: always
|
||||
ports:
|
||||
|
|
|
@ -6,8 +6,8 @@ DB_PORT=5432
|
|||
DB_NAME=onlyoffice
|
||||
DB_USER=onlyoffice
|
||||
DB_PWD=onlyoffice
|
||||
AMQP_SERVER_TYPE=rabbitmq
|
||||
AMQP_SERVER_URL=amqp://guest:guest@onlyoffice-rabbitmq
|
||||
AMQP_TYPE=rabbitmq
|
||||
AMQP_URI=amqp://guest:guest@onlyoffice-rabbitmq
|
||||
REDIS_SERVER_HOST=onlyoffice-redis
|
||||
REDIS_SERVER_PORT=6379
|
||||
JWT_ENABLED=true
|
||||
|
|
28
tests/rabbitmq-old.yml
Normal file
28
tests/rabbitmq-old.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
version: '2'
|
||||
services:
|
||||
onlyoffice-documentserver:
|
||||
container_name: onlyoffice-documentserver
|
||||
image: onlyoffice/4testing-documentserver-ie:latest
|
||||
environment:
|
||||
- AMQP_SERVER_TYPE
|
||||
- AMQP_SERVER_URL
|
||||
stdin_open: true
|
||||
restart: always
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
networks:
|
||||
- onlyoffice
|
||||
|
||||
onlyoffice-rabbitmq:
|
||||
container_name: onlyoffice-rabbitmq
|
||||
image: rabbitmq
|
||||
restart: always
|
||||
networks:
|
||||
- onlyoffice
|
||||
expose:
|
||||
- '5672'
|
||||
|
||||
networks:
|
||||
onlyoffice:
|
||||
driver: 'bridge'
|
28
tests/rabbitmq.yml
Normal file
28
tests/rabbitmq.yml
Normal file
|
@ -0,0 +1,28 @@
|
|||
version: '2'
|
||||
services:
|
||||
onlyoffice-documentserver:
|
||||
container_name: onlyoffice-documentserver
|
||||
image: onlyoffice/4testing-documentserver-ie:latest
|
||||
environment:
|
||||
- AMQP_TYPE
|
||||
- AMQP_URI
|
||||
stdin_open: true
|
||||
restart: always
|
||||
ports:
|
||||
- '80:80'
|
||||
- '443:443'
|
||||
networks:
|
||||
- onlyoffice
|
||||
|
||||
onlyoffice-rabbitmq:
|
||||
container_name: onlyoffice-rabbitmq
|
||||
image: rabbitmq
|
||||
restart: always
|
||||
networks:
|
||||
- onlyoffice
|
||||
expose:
|
||||
- '5672'
|
||||
|
||||
networks:
|
||||
onlyoffice:
|
||||
driver: 'bridge'
|
Loading…
Reference in a new issue