From 4efd7b680c1b02a666b2be624dd514e85e858a40 Mon Sep 17 00:00:00 2001 From: Anatolii Zimovskii Date: Tue, 25 Jan 2022 16:19:37 +0300 Subject: [PATCH] testrail fixes --- linux/ecosystem/testrail/{ => ad}/Dockerfile | 2 +- linux/ecosystem/testrail/{ => ad}/Makefile | 0 linux/ecosystem/testrail/{ => ad}/README.md | 0 .../ecosystem/testrail/ad/docker-compose.yml | 6 +++ linux/ecosystem/testrail/latest/Dockerfile | 45 +++++++++++++++++++ linux/ecosystem/testrail/latest/Makefile | 19 ++++++++ linux/ecosystem/testrail/latest/README.md | 36 +++++++++++++++ .../{ => latest}/apache_testrail.conf | 0 .../testrail/{ => latest}/docker-compose.yml | 0 linux/ecosystem/testrail/{ => latest}/run.sh | 0 10 files changed, 107 insertions(+), 1 deletion(-) rename linux/ecosystem/testrail/{ => ad}/Dockerfile (97%) rename linux/ecosystem/testrail/{ => ad}/Makefile (100%) rename linux/ecosystem/testrail/{ => ad}/README.md (100%) create mode 100644 linux/ecosystem/testrail/ad/docker-compose.yml create mode 100644 linux/ecosystem/testrail/latest/Dockerfile create mode 100644 linux/ecosystem/testrail/latest/Makefile create mode 100644 linux/ecosystem/testrail/latest/README.md rename linux/ecosystem/testrail/{ => latest}/apache_testrail.conf (100%) rename linux/ecosystem/testrail/{ => latest}/docker-compose.yml (100%) rename linux/ecosystem/testrail/{ => latest}/run.sh (100%) diff --git a/linux/ecosystem/testrail/Dockerfile b/linux/ecosystem/testrail/ad/Dockerfile similarity index 97% rename from linux/ecosystem/testrail/Dockerfile rename to linux/ecosystem/testrail/ad/Dockerfile index 333409e38..5831be237 100644 --- a/linux/ecosystem/testrail/Dockerfile +++ b/linux/ecosystem/testrail/ad/Dockerfile @@ -1,7 +1,7 @@ FROM epicmorg/apache2:php7.4 ARG TESTRAIL_VERSION=latest -ARG DOWNLOAD_URL=https://secure.gurock.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion71.zip +ARG DOWNLOAD_URL=https://secure.gurock.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion72.zip ARG TESTRAIL_RELEASE_DIR=testrail-release ENV TR_DEFAULT_TASK_EXECUTION=60 diff --git a/linux/ecosystem/testrail/Makefile b/linux/ecosystem/testrail/ad/Makefile similarity index 100% rename from linux/ecosystem/testrail/Makefile rename to linux/ecosystem/testrail/ad/Makefile diff --git a/linux/ecosystem/testrail/README.md b/linux/ecosystem/testrail/ad/README.md similarity index 100% rename from linux/ecosystem/testrail/README.md rename to linux/ecosystem/testrail/ad/README.md diff --git a/linux/ecosystem/testrail/ad/docker-compose.yml b/linux/ecosystem/testrail/ad/docker-compose.yml new file mode 100644 index 000000000..0cf4314f7 --- /dev/null +++ b/linux/ecosystem/testrail/ad/docker-compose.yml @@ -0,0 +1,6 @@ +version: '3.9' +services: + app: + image: "epicmorg/testrail:auth-ad" + build: + context: . diff --git a/linux/ecosystem/testrail/latest/Dockerfile b/linux/ecosystem/testrail/latest/Dockerfile new file mode 100644 index 000000000..ee1bf08bb --- /dev/null +++ b/linux/ecosystem/testrail/latest/Dockerfile @@ -0,0 +1,45 @@ +FROM epicmorg/apache2:php7.4 + +ARG TESTRAIL_VERSION=latest +ARG DOWNLOAD_URL=https://secure.gurock.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion72.zip +ARG TESTRAIL_RELEASE_DIR=testrail-release + +ENV TR_DEFAULT_TASK_EXECUTION=60 +ENV TR_WWWPATH="/var/www/testrail/" +ENV TR_CONFIGPATH="/var/www/testrail/config/" +ENV TR_CUSTOM_DIR="/var/www/testrail/custom/" +ENV TR_CUSTOM_AUTH_DIR="/var/www/testrail/custom/auth/" + +ENV TR_OPTPATH="/opt/testrail/" +ENV TR_DEFAULT_LOG_DIR="/opt/testrail/logs/" +ENV TR_DEFAULT_AUDIT_DIR="/opt/testrail/audit/" +ENV TR_DEFAULT_REPORT_DIR="/opt/testrail/reports/" +ENV TR_DEFAULT_ATTACHMENT_DIR="/opt/testrail/attachments/" +ENV OPENSSL_CONF=/etc/ssl/ + +RUN \ + apt-get update && \ + apt-get install -y --no-install-recommends zlib1g-dev libcurl4-gnutls-dev libldap2-dev zlib1g-dev libxml2-dev libfontconfig1 && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* && \ + rm -rf /run.sh + + +RUN \ + echo "WGET" && \ + mkdir -p /${TESTRAIL_RELEASE_DIR} && \ + mkdir -p /var/www/testrail && \ + mkdir -p /opt/testrail/attachments /opt/testrail/reports /opt/testrail/logs /opt/testrail/audit && \ + wget --no-check-certificate -O /${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \ + chown -R www-data:www-data /${TESTRAIL_RELEASE_DIR} && \ + chown -R www-data:www-data /var/www/testrail && \ + chown -R www-data:www-data /opt/testrail + + +COPY apache_testrail.conf /${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf +COPY run.sh /run.sh + +WORKDIR /var/www/testrail +EXPOSE 80 + +CMD ["/run.sh"] \ No newline at end of file diff --git a/linux/ecosystem/testrail/latest/Makefile b/linux/ecosystem/testrail/latest/Makefile new file mode 100644 index 000000000..bad6d73b5 --- /dev/null +++ b/linux/ecosystem/testrail/latest/Makefile @@ -0,0 +1,19 @@ +all: app + +app: + make build + make deploy + make clean + +build: + docker-compose build --compress --parallel + +deploy: + docker-compose push + +clean: + docker container prune -f + docker image prune -f + docker network prune -f + docker volume prune -f + docker system prune -af diff --git a/linux/ecosystem/testrail/latest/README.md b/linux/ecosystem/testrail/latest/README.md new file mode 100644 index 000000000..1aae0e92d --- /dev/null +++ b/linux/ecosystem/testrail/latest/README.md @@ -0,0 +1,36 @@ +## Testrail + +* Based on `websites:php7.2` of our ecosystem. + +# Compose example + +```yml +version: '3.7' +services: + testrail: + image: epicmorg/testrail +# depends_on: +# - mysql +# - memcached + restart: unless-stopped + volumes: + - /etc/localtime:/etc/localtime + - /etc/timezone:/etc/timezone +# - /etc/letsencrypt:/etc/letsencrypt + - www:/var/www + - apache2:/etc/apache2 + - php:/etc/php + restart: unless-stopped +# extra_hosts: +# - "example.com:192.168.0.11" + tmpfs: + - /tmp + - /var/lib/php/sessions +volumes: + www: + external: true + apache2: + external: true + php: + external: true +``` diff --git a/linux/ecosystem/testrail/apache_testrail.conf b/linux/ecosystem/testrail/latest/apache_testrail.conf similarity index 100% rename from linux/ecosystem/testrail/apache_testrail.conf rename to linux/ecosystem/testrail/latest/apache_testrail.conf diff --git a/linux/ecosystem/testrail/docker-compose.yml b/linux/ecosystem/testrail/latest/docker-compose.yml similarity index 100% rename from linux/ecosystem/testrail/docker-compose.yml rename to linux/ecosystem/testrail/latest/docker-compose.yml diff --git a/linux/ecosystem/testrail/run.sh b/linux/ecosystem/testrail/latest/run.sh similarity index 100% rename from linux/ecosystem/testrail/run.sh rename to linux/ecosystem/testrail/latest/run.sh