diff --git a/.travis.yml b/.travis.yml index 4371198..37749d6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,13 @@ language: generic dist: trusty env: + # community edition + - config: standalone.yml + + # integration edition + - config: standalone.yml + PRODUCT_NAME: documentserver-ie + # certificates (default tls if onlyoffice not exists) - config: certs.yml ssl: true @@ -52,9 +59,13 @@ env: # rabbitmq old variables - config: rabbitmq-old.yml - # redis + # redis with community edition - config: redis.yml + # redis with integraion edition + - config: redis.yml + PRODUCT_NAME: documentserver-ie + # graphite - config: graphite.yml diff --git a/Dockerfile b/Dockerfile index d996e71..5585e64 100644 --- a/Dockerfile +++ b/Dockerfile @@ -67,7 +67,8 @@ ARG REPO_URL="deb http://download.onlyoffice.com/repo/debian squeeze main" ARG COMPANY_NAME=onlyoffice ARG PRODUCT_NAME=documentserver -ENV COMPANY_NAME=$COMPANY_NAME +ENV COMPANY_NAME=$COMPANY_NAME \ + PRODUCT_NAME=$PRODUCT_NAME RUN echo "$REPO_URL" | tee /etc/apt/sources.list.d/ds.list && \ apt-get -y update && \ diff --git a/Makefile b/Makefile index ce11a08..fad186b 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,10 @@ clean-docker: docker rmi -f $$(docker images -q $(COMPANY_NAME_LOW)/*) || exit 0 deploy: $(DOCKER_TARGETS) - $(foreach TARGET,$(DOCKER_TARGETS),docker push $(subst $(COLON),:,$(TARGET));) + $(foreach TARGET,$(DOCKER_TARGETS), \ + for i in {1..3}; do \ + docker push $(subst $(COLON),:,$(TARGET)) && break || sleep 1m; \ + done;) publish: $(DOCKER_ARCH) aws s3 cp \ diff --git a/run-document-server.sh b/run-document-server.sh index 21ddea3..86e8c09 100755 --- a/run-document-server.sh +++ b/run-document-server.sh @@ -49,6 +49,12 @@ JWT_SECRET=${JWT_SECRET:-secret} JWT_HEADER=${JWT_HEADER:-Authorization} JWT_IN_BODY=${JWT_IN_BODY:-false} +if [[ ${PRODUCT_NAME} == "documentserver" ]]; then + REDIS_ENABLED=false +else + REDIS_ENABLED=true +fi + ONLYOFFICE_DEFAULT_CONFIG=${CONF_DIR}/local.json ONLYOFFICE_LOG4JS_CONFIG=${CONF_DIR}/log4js/production.json ONLYOFFICE_EXAMPLE_CONFIG=${CONF_DIR}-example/local.json @@ -479,7 +485,7 @@ if [ ${ONLYOFFICE_DATA_CONTAINER_HOST} = "localhost" ]; then if [ ${REDIS_SERVER_HOST} != "localhost" ]; then update_redis_settings - else + elif [ ${REDIS_ENABLED} = "true" ]; then # change rights for redis directory chown -R redis:redis ${REDIS_DATA} chmod -R 750 ${REDIS_DATA} @@ -510,7 +516,9 @@ fi if [ ${ONLYOFFICE_DATA_CONTAINER} != "true" ]; then waiting_for_db waiting_for_amqp - waiting_for_redis + if [ ${REDIS_ENABLED} = "true" ]; then + waiting_for_redis + fi update_nginx_settings diff --git a/tests/redis.yml b/tests/redis.yml index 9405b72..5f759ad 100644 --- a/tests/redis.yml +++ b/tests/redis.yml @@ -4,6 +4,8 @@ services: container_name: onlyoffice-documentserver build: context: ../. + args: + - PRODUCT_NAME=${PRODUCT_NAME:-documentserver} environment: - REDIS_SERVER_HOST=${REDIS_SERVER_HOST:-onlyoffice-redis} - REDIS_SERVER_PORT=${REDIS_SERVER_PORT:-6379} diff --git a/tests/standalone.yml b/tests/standalone.yml new file mode 100644 index 0000000..f3de32f --- /dev/null +++ b/tests/standalone.yml @@ -0,0 +1,12 @@ +version: '2.1' +services: + onlyoffice-documentserver: + container_name: onlyoffice-documentserver + build: + context: ../. + args: + - PRODUCT_NAME=${PRODUCT_NAME:-documentserver} + stdin_open: true + restart: always + ports: + - '80:80'