mirror of
https://github.com/EpicMorg/docker-scripts.git
synced 2025-04-10 03:20:16 +03:00
Testrail Production image (php 7.2)
This commit is contained in:
parent
9fb1e78f18
commit
ee2d1cd8eb
41
testrail/Dockerfile
Normal file
41
testrail/Dockerfile
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
FROM epicmorg/websites:php7.2
|
||||||
|
|
||||||
|
ARG TESTRAIL_VERSION=latest
|
||||||
|
ARG DOWNLOAD_URL=https://secure.gurock.com/downloads/testrail/testrail-${TESTRAIL_VERSION}-ion71.zip
|
||||||
|
ARG TESTRAIL_RELEASE_DIR=testrail-release
|
||||||
|
|
||||||
|
ENV TR_DEFAULT_TASK_EXECUTION=60
|
||||||
|
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
||||||
|
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 curl zip unzip wget iputils-ping mariadb-client openssl && \
|
||||||
|
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"]
|
@ -1,3 +0,0 @@
|
|||||||
RewriteEngine On
|
|
||||||
RewriteCond %{HTTPS} off
|
|
||||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
|
@ -1,72 +0,0 @@
|
|||||||
ARG ARG_PHP_VERSION=7.2
|
|
||||||
FROM php:${ARG_PHP_VERSION}-apache
|
|
||||||
|
|
||||||
ARG ARG_PHP_VERSION=7.2
|
|
||||||
ARG ARG_IONCUBE_VERSION=10.3.2
|
|
||||||
ARG ARG_URL=https://secure.gurock.com/downloads/testrail/testrail-latest-ion71.zip
|
|
||||||
|
|
||||||
ENV TR_DEFAULT_TASK_EXECUTION=60
|
|
||||||
ENV TR_CONFIGPATH="/var/www/testrail/config/"
|
|
||||||
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/
|
|
||||||
|
|
||||||
LABEL vendor="TestRail" \
|
|
||||||
maintainer="Christian Breitwieser" \
|
|
||||||
email="cbreitwieser@ranorex.com" \
|
|
||||||
type="TestRail php-fpm apache image including ionCube loader." \
|
|
||||||
description="This is an image which runs apache php-fpm with ionCube for testrail."
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
apt-get update && \
|
|
||||||
apt-get install -y --no-install-recommends curl zip unzip wget iputils-ping mariadb-client openssl && \
|
|
||||||
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/*
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
docker-php-ext-install mbstring && \
|
|
||||||
if [ "x$ARG_PHP_VERSION" = "5."* ] ; then docker-php-ext-install mysql; \
|
|
||||||
else docker-php-ext-install mysqli; \
|
|
||||||
fi && \
|
|
||||||
docker-php-ext-install curl && \
|
|
||||||
docker-php-ext-install zip && \
|
|
||||||
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu && \
|
|
||||||
docker-php-ext-install ldap
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
wget --no-check-certificate -O /tmp/testrail.zip ${ARG_URL} && \
|
|
||||||
mkdir -p /var/www/testrail && \
|
|
||||||
mkdir -p /opt/testrail/attachments /opt/testrail/reports /opt/testrail/logs /opt/testrail/audit && \
|
|
||||||
unzip /tmp/testrail.zip -d /var/www/ && \
|
|
||||||
rm /tmp/testrail.zip && \
|
|
||||||
chown -R www-data:www-data /var/www/testrail && \
|
|
||||||
chown -R www-data:www-data /opt/testrail
|
|
||||||
|
|
||||||
COPY php.ini /usr/local/etc/php/conf.d/php.ini
|
|
||||||
|
|
||||||
RUN \
|
|
||||||
wget -O /tmp/ioncube.tar.gz http://downloads.ioncube.com/loader_downloads/ioncube_loaders_lin_x86-64_${ARG_IONCUBE_VERSION}.tar.gz && \
|
|
||||||
tar -xzf /tmp/ioncube.tar.gz -C /tmp && \
|
|
||||||
mv /tmp/ioncube /opt/ioncube && \
|
|
||||||
echo zend_extension=/opt/ioncube/ioncube_loader_lin_${ARG_PHP_VERSION}.so >> /usr/local/etc/php/php.ini && \
|
|
||||||
rm -f /tmp/ioncube.tar.gz
|
|
||||||
|
|
||||||
RUN mkdir -p /apache-conf
|
|
||||||
VOLUME /apache-conf
|
|
||||||
|
|
||||||
RUN mkdir -p /etc/apache2/ssl
|
|
||||||
VOLUME /etc/apache2/ssl
|
|
||||||
|
|
||||||
COPY apache_testrail.conf /apache-conf/000-default.conf
|
|
||||||
COPY ssl_apache_testrail.conf /apache-conf/ssl_apache_testrail.conf
|
|
||||||
COPY .htaccess /apache-conf/.htaccess
|
|
||||||
|
|
||||||
COPY custom-entrypoint.sh /custom-entrypoint.sh
|
|
||||||
ENTRYPOINT ["/custom-entrypoint.sh"]
|
|
||||||
CMD ["apache2-foreground"]
|
|
||||||
|
|
||||||
WORKDIR /var/www/testrail
|
|
||||||
EXPOSE 80
|
|
@ -1,13 +0,0 @@
|
|||||||
# Testrail Apache PHP-FPM image
|
|
||||||
|
|
||||||
To be extendeded...
|
|
||||||
|
|
||||||
## How to build the image?
|
|
||||||
|
|
||||||
The build supports `ARG_PHP_VERSION`, `ARG_IONCUBE_VERSION`, and `ARG_URL` as arguments as shown below.
|
|
||||||
|
|
||||||
```
|
|
||||||
docker build --build-arg ARG_PHP_VERSION=7.2 --build-arg ARG_IONCUBE_VERSION=10.3.9 --build-arg ARG_URL='https://secure.gurock.com/downloads/testrail/testrail-latest-ion70.zip' -t testrail/apache:6.0 .
|
|
||||||
```
|
|
||||||
|
|
||||||
__Please note:__ When proving a custom zip-file, ensure that it also fits the php-version provided!
|
|
File diff suppressed because it is too large
Load Diff
@ -1,14 +0,0 @@
|
|||||||
<VirtualHost *:443>
|
|
||||||
#ServerName www.example.com
|
|
||||||
|
|
||||||
ServerAdmin webmaster@localhost
|
|
||||||
DocumentRoot /var/www/testrail
|
|
||||||
|
|
||||||
SSLEngine on
|
|
||||||
SSLCertificateFile /etc/apache2/ssl/certificate.crt
|
|
||||||
SSLCertificateKeyFile /etc/apache2/ssl/key.pem
|
|
||||||
SSLCertificateChainFile /etc/apache2/ssl/certificate.crt
|
|
||||||
|
|
||||||
ErrorLog ${APACHE_LOG_DIR}/ssl_error.log
|
|
||||||
CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined
|
|
||||||
</VirtualHost>
|
|
@ -11,24 +11,11 @@ function createOptDirectory {
|
|||||||
chown -R www-data:www-data $1
|
chown -R www-data:www-data $1
|
||||||
}
|
}
|
||||||
|
|
||||||
rm -f /etc/apache2/sites-enabled/ssl_apache_testrail.conf
|
/bin/cp -rf /testrail-release/apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
cp /apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
|
|
||||||
|
|
||||||
if [ ! -z "$SSL" ]
|
echo "##############"
|
||||||
then
|
echo "Unzipping testrail"
|
||||||
echo
|
unzip /testrail-release/testrail.zip -d /var/www/
|
||||||
echo "####################################################"
|
|
||||||
echo " Applying SSL configuration -- please ensure that certificate and key files exist"
|
|
||||||
echo "####################################################"
|
|
||||||
echo
|
|
||||||
|
|
||||||
# Enable SSL
|
|
||||||
a2enmod ssl
|
|
||||||
cp -f /apache-conf/ssl_apache_testrail.conf /etc/apache2/sites-enabled/ssl_apache_testrail.conf
|
|
||||||
# Perform redirection from HTTP to HTTPS
|
|
||||||
a2enmod rewrite
|
|
||||||
cp -f /apache-conf/.htaccess /var/www/testrail/.htaccess
|
|
||||||
fi
|
|
||||||
|
|
||||||
createOptDirectory $TR_DEFAULT_LOG_DIR
|
createOptDirectory $TR_DEFAULT_LOG_DIR
|
||||||
createOptDirectory $TR_DEFAULT_AUDIT_DIR
|
createOptDirectory $TR_DEFAULT_AUDIT_DIR
|
||||||
@ -53,4 +40,8 @@ while /bin/true; do
|
|||||||
done &
|
done &
|
||||||
echo "##############"
|
echo "##############"
|
||||||
|
|
||||||
docker-php-entrypoint "$@"
|
chown www-data:www-data /var/www -R
|
||||||
|
|
||||||
|
source /etc/apache2/envvars
|
||||||
|
tail -F /var/log/apache2/* &
|
||||||
|
exec apache2 -D FOREGROUND
|
Loading…
x
Reference in New Issue
Block a user