From a1aa8b21e24a51d4dc962d51cb8874f4a4b66b68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ji=C5=99=C3=AD=20=C5=A0tefka?= Date: Wed, 9 Mar 2022 19:01:03 +0100 Subject: [PATCH] Remove unnecessary files To clarify, unnecessary for this usecase. To find all files with the modifications in `Dockerfile` for `arm64` look into the [arm64-full_repo](https://github.com/jiriks74/Docker-DocumentServer-Arm64/tree/arm64-full_repo) --- Makefile | 69 -------------------- cluster.yml | 108 -------------------------------- tests/activemq.yml | 32 ---------- tests/certs-customized.yml | 18 ------ tests/certs.yml | 13 ---- tests/graphite.yml | 32 ---------- tests/graphite/statsd/config.js | 7 --- tests/mariadb.yml | 36 ----------- tests/mysql.yml | 37 ----------- tests/postgres-old.yml | 34 ---------- tests/postgres.yml | 35 ----------- tests/rabbitmq-old.yml | 29 --------- tests/rabbitmq.yml | 29 --------- tests/redis.yml | 31 --------- tests/standalone.yml | 12 ---- tests/test.sh | 54 ---------------- 16 files changed, 576 deletions(-) delete mode 100644 Makefile delete mode 100644 cluster.yml delete mode 100644 tests/activemq.yml delete mode 100644 tests/certs-customized.yml delete mode 100644 tests/certs.yml delete mode 100644 tests/graphite.yml delete mode 100644 tests/graphite/statsd/config.js delete mode 100644 tests/mariadb.yml delete mode 100644 tests/mysql.yml delete mode 100644 tests/postgres-old.yml delete mode 100644 tests/postgres.yml delete mode 100644 tests/rabbitmq-old.yml delete mode 100644 tests/rabbitmq.yml delete mode 100644 tests/redis.yml delete mode 100644 tests/standalone.yml delete mode 100755 tests/test.sh diff --git a/Makefile b/Makefile deleted file mode 100644 index f840a15..0000000 --- a/Makefile +++ /dev/null @@ -1,69 +0,0 @@ -COMPANY_NAME ?= ONLYOFFICE -GIT_BRANCH ?= develop -PRODUCT_NAME ?= DocumentServer -PRODUCT_VERSION ?= 0.0.0 -BUILD_NUMBER ?= 0 -ONLYOFFICE_VALUE ?= onlyoffice -S3_BUCKET ?= repo-doc-onlyoffice-com -RELEASE_BRANCH ?= unstable - -COMPANY_NAME_LOW = $(shell echo $(COMPANY_NAME) | tr A-Z a-z) -PRODUCT_NAME_LOW = $(shell echo $(PRODUCT_NAME) | tr A-Z a-z) -COMPANY_NAME_LOW_ESCAPED = $(subst -,,$(COMPANY_NAME_LOW)) - -PACKAGE_NAME := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW) -PACKAGE_VERSION := $(PRODUCT_VERSION)-$(BUILD_NUMBER) -PACKAGE_URL := http://$(S3_BUCKET).s3.amazonaws.com/$(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/ubuntu/$(PACKAGE_NAME)_$(PACKAGE_VERSION)_amd64.deb - -ifeq ($(RELEASE_BRANCH),$(filter $(RELEASE_BRANCH),unstable testing)) - DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION)) -else - DOCKER_TAG := $(subst -,.,$(PACKAGE_VERSION))-$(subst /,-,$(GIT_BRANCH)) -endif - -DOCKER_IMAGE := $(subst -,,$(COMPANY_NAME_LOW))/4testing-$(PRODUCT_NAME_LOW) -DOCKER_DUMMY := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)__$(DOCKER_TAG).dummy -DOCKER_ARCH := $(COMPANY_NAME_LOW)-$(PRODUCT_NAME_LOW)_$(PACKAGE_VERSION).tar.gz -DOCKER_ARCH_URI := $(COMPANY_NAME_LOW)/$(RELEASE_BRANCH)/docker/$(notdir $(DOCKER_ARCH)) - -.PHONY: all clean clean-docker image deploy docker publish - -$(DOCKER_DUMMY): - docker pull ubuntu:20.04 - docker build \ - --build-arg PACKAGE_URL=$(PACKAGE_URL) \ - --build-arg COMPANY_NAME=$(COMPANY_NAME_LOW) \ - --build-arg PRODUCT_NAME=$(PRODUCT_NAME_LOW) \ - --build-arg ONLYOFFICE_VALUE=$(ONLYOFFICE_VALUE) \ - -t $(DOCKER_IMAGE):$(DOCKER_TAG) . && \ - mkdir -p $$(dirname $@) && \ - echo "Done" > $@ - -$(DOCKER_ARCH): $(DOCKER_DUMMY) - docker save $(DOCKER_IMAGE):$(DOCKER_TAG) | \ - gzip > $@ - -all: image - -clean: - rm -rfv *.dummy *.tar.gz - -clean-docker: - docker rmi -f $$(docker images -q $(COMPANY_NAME_LOW)/*) || exit 0 - -image: $(DOCKER_DUMMY) - -deploy: $(DOCKER_DUMMY) - for i in {1..3}; do \ - docker push $(DOCKER_IMAGE):$(DOCKER_TAG) && break || sleep 1m; \ - done -ifeq ($(RELEASE_BRANCH),unstable) - docker tag $(DOCKER_IMAGE):$(DOCKER_TAG) $(DOCKER_IMAGE):latest - for i in {1..3}; do \ - docker push $(DOCKER_IMAGE):latest && break || sleep 1m; \ - done -endif - -publish: $(DOCKER_ARCH) - aws s3 cp --no-progress --acl public-read \ - $(DOCKER_ARCH) s3://$(S3_BUCKET)/$(DOCKER_ARCH_URI) diff --git a/cluster.yml b/cluster.yml deleted file mode 100644 index 0cb07c1..0000000 --- a/cluster.yml +++ /dev/null @@ -1,108 +0,0 @@ -version: '2.1' - -x-ds-image: - &ds-image - ${COMPANY_NAME:-onlyoffice}/${PRODUCT_NAME:-documentserver-de}:${PRODUCT_VERSION:-latest} - -services: - onlyoffice-documentserver-data: - container_name: onlyoffice-documentserver-data - image: *ds-image - environment: - - ONLYOFFICE_DATA_CONTAINER=true - - DB_HOST=onlyoffice-postgresql - - DB_PORT=5432 - - DB_NAME=onlyoffice - - DB_USER=onlyoffice - - 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. - #- JWT_ENABLED=true - #- JWT_SECRET=secret - #- JWT_HEADER=Authorization - #- JWT_IN_BODY=true - stdin_open: true - restart: always - volumes: - - /etc/onlyoffice - - /var/www/onlyoffice/Data - - /var/log/onlyoffice - - /var/lib/onlyoffice/documentserver/App_Data/cache/files - - /var/www/onlyoffice/documentserver-example/public/files - - /usr/share/fonts - - onlyoffice-documentserver: - image: *ds-image - depends_on: - - onlyoffice-documentserver-data - - onlyoffice-postgresql - - onlyoffice-redis - - onlyoffice-rabbitmq - environment: - - ONLYOFFICE_DATA_CONTAINER_HOST=onlyoffice-documentserver-data - - BALANCE=uri depth 3 - - EXCLUDE_PORTS=443 - - HTTP_CHECK=GET /healthcheck - - EXTRA_SETTINGS=http-check expect string true - # Uncomment the string below to redirect HTTP request to HTTPS request. - #- FORCE_SSL=true - stdin_open: true - restart: always - expose: - - '80' - volumes_from: - - onlyoffice-documentserver-data - - onlyoffice-haproxy: - container_name: onlyoffice-haproxy - image: dockercloud/haproxy:1.5.1 - depends_on: - - onlyoffice-documentserver - environment: - - MODE=http - # Uncomment the string below to specify the path of ssl certificates - #- CERT_FOLDER=/certs/ - stdin_open: true - links: - - onlyoffice-documentserver - volumes: - - /var/run/docker.sock:/var/run/docker.sock - # Uncomment the string below to map a ssl certificate from host - # to the proxy container - #- /app/onlyoffice/DocumentServer/data/certs/onlyoffice.pem:/certs/cert1.pem - restart: always - ports: - - '80:80' - - '443:443' - - '1936:1936' - - onlyoffice-redis: - container_name: onlyoffice-redis - image: redis - restart: always - expose: - - '6379' - - onlyoffice-rabbitmq: - container_name: onlyoffice-rabbitmq - image: rabbitmq - restart: always - expose: - - '5672' - - onlyoffice-postgresql: - container_name: onlyoffice-postgresql - image: postgres:9.5 - environment: - - POSTGRES_DB=onlyoffice - - POSTGRES_USER=onlyoffice - - POSTGRES_HOST_AUTH_METHOD=trust - restart: always - expose: - - '5432' - volumes: - - postgresql_data:/var/lib/postgresql - -volumes: - postgresql_data: diff --git a/tests/activemq.yml b/tests/activemq.yml deleted file mode 100644 index 5781c64..0000000 --- a/tests/activemq.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - environment: - - AMQP_TYPE=${AMQP_TYPE:-activemq} - - AMQP_URI=${AMQP_URI:-amqp://guest:guest@onlyoffice-activemq} - stdin_open: true - restart: always - ports: - - '80:80' - - '443:443' - networks: - - onlyoffice - - onlyoffice-activemq: - container_name: onlyoffice-activemq - image: webcenter/activemq:${ACTIVEMQ_VERSION:-5.14.3} - environment: - - ACTIVEMQ_USERS_guest=${ACTIVEMQ_USERS_guest:-guest} - - ACTIVEMQ_GROUPS_owners=${ACTIVEMQ_GROUPS_owners:-guest} - restart: always - networks: - - onlyoffice - expose: - - '5672' - -networks: - onlyoffice: - driver: 'bridge' diff --git a/tests/certs-customized.yml b/tests/certs-customized.yml deleted file mode 100644 index af73081..0000000 --- a/tests/certs-customized.yml +++ /dev/null @@ -1,18 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - environment: - - SSL_CERTIFICATE_PATH=${SSL_CERTIFICATE_PATH:-/var/www/onlyoffice/Data/certs/tls.crt} - - SSL_KEY_PATH=${SSL_KEY_PATH:-/var/www/onlyoffice/Data/certs/tls.key} - - CA_CERTIFICATES_PATH=${CA_CERTIFICATES_PATH:-/var/www/onlyoffice/Data/certs/ca-certificates.pem} - - SSL_DHPARAM_PATH=${SSL_DHPARAM_PATH:-/var/www/onlyoffice/Data/certs/dhparam.pem} - stdin_open: true - restart: always - ports: - - '80:80' - - '443:443' - volumes: - - ./data:/var/www/onlyoffice/Data diff --git a/tests/certs.yml b/tests/certs.yml deleted file mode 100644 index 77d37ce..0000000 --- a/tests/certs.yml +++ /dev/null @@ -1,13 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - stdin_open: true - restart: always - ports: - - '80:80' - - '443:443' - volumes: - - ./data:/var/www/onlyoffice/Data diff --git a/tests/graphite.yml b/tests/graphite.yml deleted file mode 100644 index 2bc4694..0000000 --- a/tests/graphite.yml +++ /dev/null @@ -1,32 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - depends_on: - - onlyoffice-graphite - environment: - - METRICS_ENABLED=${METRICS_ENABLED:-true} - - METRICS_HOST=${METRICS_HOST:-localhost} - - METRICS_PORT=${METRICS_PORT:-8125} - - METRICS_PREFIX=${METRICS_PREFIX:-ds.} - stdin_open: true - restart: always - expose: - - '2003' - ports: - - '80:80' - volumes: - - ./graphite/statsd:/var/www/onlyoffice/documentserver/server/Metrics/config - - onlyoffice-graphite: - container_name: onlyoffice-graphite - image: graphiteapp/graphite-statsd - environment: - - GRAPHITE_STATSD_HOST=${GRAPHITE_STATSD_HOST:-onlyoffice-documentserver} - - GRAPHITE_TIME_ZONE=${GRAPHITE_TIME_ZONE:-Etc/UTC} - ports: - - '8888:80' - stdin_open: true - restart: always diff --git a/tests/graphite/statsd/config.js b/tests/graphite/statsd/config.js deleted file mode 100644 index 2ebffe6..0000000 --- a/tests/graphite/statsd/config.js +++ /dev/null @@ -1,7 +0,0 @@ -{ - "graphiteHost": "onlyoffice-graphite", - "graphitePort": 2003, - "port": 8125, - "flushInterval": 60000, - "backends": [ "./backends/graphite.js" ] -} diff --git a/tests/mariadb.yml b/tests/mariadb.yml deleted file mode 100644 index 4bb8de5..0000000 --- a/tests/mariadb.yml +++ /dev/null @@ -1,36 +0,0 @@ -version: '2.1' -services: - ds: - container_name: ds - build: - context: ../. - depends_on: - - onlyoffice-mariadb - environment: - - DB_TYPE=${DB_TYPE:-mysql} - - DB_HOST=${DB_HOST:-onlyoffice-mariadb} - - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-onlyoffice} - - DB_USER=${DB_USER:-onlyoffice} - - DB_PWD=${DB_PWD:-onlyoffice} - stdin_open: true - restart: always - ports: - - '80:80' - - onlyoffice-mariadb: - container_name: onlyoffice-mariadb - image: mariadb:${MARIADB_VERSION:-10.5} - environment: - - MYSQL_DATABASE=${MYSQL_DATABASE:-onlyoffice} - - MYSQL_USER=${MYSQL_USER:-onlyoffice} - - MYSQL_PASSWORD=${MYSQL_PASSWORD:-onlyoffice} - - MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD:-yes} - restart: always - volumes: - - mysql_data:/var/lib/mysql - expose: - - '3306' - -volumes: - mysql_data: diff --git a/tests/mysql.yml b/tests/mysql.yml deleted file mode 100644 index 20fcd70..0000000 --- a/tests/mysql.yml +++ /dev/null @@ -1,37 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - depends_on: - - onlyoffice-mysql - environment: - - DB_TYPE=${DB_TYPE:-mysql} - - DB_HOST=${DB_HOST:-onlyoffice-mysql} - - DB_PORT=${DB_PORT:-3306} - - DB_NAME=${DB_NAME:-onlyoffice} - - DB_USER=${DB_USER:-onlyoffice} - - DB_PWD=${DB_PWD:-onlyoffice} - stdin_open: true - restart: always - ports: - - '80:80' - - onlyoffice-mysql: - container_name: onlyoffice-mysql - image: mysql:${MYSQL_VERSION:-5.7} - command: --default-authentication-plugin=mysql_native_password - environment: - - MYSQL_DATABASE=${MYSQL_DATABASE:-onlyoffice} - - MYSQL_USER=${MYSQL_USER:-onlyoffice} - - MYSQL_PASSWORD=${MYSQL_PASSWORD:-onlyoffice} - - MYSQL_ALLOW_EMPTY_PASSWORD=${MYSQL_ALLOW_EMPTY_PASSWORD:-yes} - restart: always - volumes: - - mysql_data:/var/lib/mysql - expose: - - '3306' - -volumes: - mysql_data: diff --git a/tests/postgres-old.yml b/tests/postgres-old.yml deleted file mode 100644 index 237246c..0000000 --- a/tests/postgres-old.yml +++ /dev/null @@ -1,34 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - depends_on: - - onlyoffice-postgresql - environment: - - POSTGRESQL_SERVER_HOST=${DB_HOST:-onlyoffice-postgresql} - - POSTGRESQL_SERVER_PORT=${DB_PORT:-5432} - - POSTGRESQL_SERVER_DB_NAME=${DB_NAME:-onlyoffice} - - POSTGRESQL_SERVER_USER=${DB_USER:-onlyoffice} - - POSTGRESQL_SERVER_PASS=${DB_PWD:-onlyoffice} - stdin_open: true - restart: always - ports: - - '80:80' - - onlyoffice-postgresql: - container_name: onlyoffice-postgresql - image: postgres:9.5 - environment: - - POSTGRES_DB=${POSTGRES_DB:-onlyoffice} - - POSTGRES_USER=${POSTGRES_USER:-onlyoffice} - - POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD:-trust} - restart: always - expose: - - '5432' - volumes: - - postgresql_data:/var/lib/postgresql - -volumes: - postgresql_data: diff --git a/tests/postgres.yml b/tests/postgres.yml deleted file mode 100644 index 8333b10..0000000 --- a/tests/postgres.yml +++ /dev/null @@ -1,35 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - depends_on: - - onlyoffice-postgresql - environment: - - DB_TYPE=${DB_TYPE:-postgres} - - DB_HOST=${DB_HOST:-onlyoffice-postgresql} - - DB_PORT=${DB_PORT:-5432} - - DB_NAME=${DB_NAME:-onlyoffice} - - DB_USER=${DB_USER:-onlyoffice} - - DB_PWD=${DB_PWD:-onlyoffice} - stdin_open: true - restart: always - ports: - - '80:80' - - onlyoffice-postgresql: - container_name: onlyoffice-postgresql - image: postgres:${POSTGRES_VERSION:-9.5} - environment: - - POSTGRES_DB=${POSTGRES_DB:-onlyoffice} - - POSTGRES_USER=${POSTGRES_USER:-onlyoffice} - - POSTGRES_HOST_AUTH_METHOD=${POSTGRES_HOST_AUTH_METHOD:-trust} - restart: always - expose: - - '5432' - volumes: - - postgresql_data:/var/lib/postgresql - -volumes: - postgresql_data: diff --git a/tests/rabbitmq-old.yml b/tests/rabbitmq-old.yml deleted file mode 100644 index ce18691..0000000 --- a/tests/rabbitmq-old.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - environment: - - AMQP_SERVER_TYPE=${AMQP_SERVER_TYPE:-rabbitmq} - - AMQP_SERVER_URL=${AMQP_SERVER_URL:-amqp://guest:guest@onlyoffice-rabbitmq} - 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' diff --git a/tests/rabbitmq.yml b/tests/rabbitmq.yml deleted file mode 100644 index 293045c..0000000 --- a/tests/rabbitmq.yml +++ /dev/null @@ -1,29 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - container_name: onlyoffice-documentserver - build: - context: ../. - environment: - - AMQP_TYPE=${AMQP_TYPE:-rabbitmq} - - AMQP_URI=${AMQP_URI:-amqp://guest:guest@onlyoffice-rabbitmq} - stdin_open: true - restart: always - ports: - - '80:80' - - '443:443' - networks: - - onlyoffice - - onlyoffice-rabbitmq: - container_name: onlyoffice-rabbitmq - image: rabbitmq:${RABBITMQ_VERSION:-latest} - restart: always - networks: - - onlyoffice - expose: - - '5672' - -networks: - onlyoffice: - driver: 'bridge' diff --git a/tests/redis.yml b/tests/redis.yml deleted file mode 100644 index 849be16..0000000 --- a/tests/redis.yml +++ /dev/null @@ -1,31 +0,0 @@ -version: '2.1' -services: - onlyoffice-documentserver: - 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} - stdin_open: true - restart: always - ports: - - '80:80' - - '443:443' - networks: - - onlyoffice - - onlyoffice-redis: - container_name: onlyoffice-redis - image: redis:${REDIS_VERSION:-latest} - restart: always - networks: - - onlyoffice - expose: - - '6379' - -networks: - onlyoffice: - driver: 'bridge' diff --git a/tests/standalone.yml b/tests/standalone.yml deleted file mode 100644 index f3de32f..0000000 --- a/tests/standalone.yml +++ /dev/null @@ -1,12 +0,0 @@ -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' diff --git a/tests/test.sh b/tests/test.sh deleted file mode 100755 index 535003a..0000000 --- a/tests/test.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/bin/bash - -ssl=${ssl:-false} -private_key=${private_key:-tls.key} -certificate_request=${certificate_request:-tls.csr} -certificate=${certificate:-tls.crt} - -# Generate certificate -if [[ $ssl == "true" ]]; then - url=${url:-"https://localhost"} - - mkdir -p data/certs - pushd data/certs - - openssl genrsa -out ${private_key} 2048 - openssl req \ - -new \ - -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=www.example.com" \ - -key ${private_key} \ - -out ${certificate_request} - openssl x509 -req -days 365 -in ${certificate_request} -signkey ${private_key} -out ${certificate} - openssl dhparam -out dhparam.pem 2048 - chmod 400 ${private_key} - - popd -else - url=${url:-"http://localhost"} -fi - -# Check if the yml exists -if [[ ! -f $config ]]; then - echo "File $config doesn't exist!" - exit 1 -fi - -# Run test environment -docker-compose -p ds -f $config up -d - -wakeup_timeout=90 - -# Get documentserver healthcheck status -echo "Wait for service wake up" -sleep $wakeup_timeout -healthcheck_res=$(wget --no-check-certificate -qO - ${url}/healthcheck) - -# Fail if it isn't true -if [[ $healthcheck_res == "true" ]]; then - echo "Healthcheck passed." -else - echo "Healthcheck failed!" - exit 1 -fi - -docker-compose -p ds -f $config down -- 2.45.2