Add external volumes for rabbitmq and redis

This commit is contained in:
Roman 2019-12-17 15:45:48 +03:00
parent 261232e10d
commit f57f65d1d3
2 changed files with 12 additions and 0 deletions

View file

@ -67,6 +67,8 @@ To get access to your data from outside the container, you need to mount the vol
-v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \ -v /app/onlyoffice/DocumentServer/logs:/var/log/onlyoffice \
-v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \ -v /app/onlyoffice/DocumentServer/data:/var/www/onlyoffice/Data \
-v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \ -v /app/onlyoffice/DocumentServer/lib:/var/lib/onlyoffice \
-v /app/onlyoffice/DocumentServer/rabbitmq:/var/lib/rabbitmq \
-v /app/onlyoffice/DocumentServer/redis:/var/lib/redis \
-v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver -v /app/onlyoffice/DocumentServer/db:/var/lib/postgresql onlyoffice/documentserver
Normally, you do not need to store container data because the container's operation does not depend on its state. Saving data will be useful: Normally, you do not need to store container data because the container's operation does not depend on its state. Saving data will be useful:

View file

@ -57,6 +57,8 @@ PG_VERSION=9.5
PG_NAME=main PG_NAME=main
PGDATA=${PG_ROOT}/${PG_VERSION}/${PG_NAME} PGDATA=${PG_ROOT}/${PG_VERSION}/${PG_NAME}
PG_NEW_CLUSTER=false PG_NEW_CLUSTER=false
RABBIT_ROOT=/var/lib/rabbitmq
REDIS_ROOT=/var/lib/redis
read_setting(){ read_setting(){
deprecated_var POSTGRESQL_SERVER_HOST DB_HOST deprecated_var POSTGRESQL_SERVER_HOST DB_HOST
@ -429,6 +431,14 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then
PG_NEW_CLUSTER=true PG_NEW_CLUSTER=true
fi fi
LOCAL_SERVICES+=("postgresql") LOCAL_SERVICES+=("postgresql")
# change rights for rabbitmq directory
chown -R rabbitmq:rabbitmq ${RABBIT_ROOT}
chmod -R 755 ${RABBIT_ROOT}
# change rights for redis directory
chown -R redis:redis ${REDIS_ROOT}
chmod -R 755 ${REDIS_ROOT}
fi fi
if [ ${AMQP_SERVER_HOST} != "localhost" ]; then if [ ${AMQP_SERVER_HOST} != "localhost" ]; then