This commit is contained in:
STAM 2020-05-20 16:57:04 +03:00
parent 85731914e9
commit f456c46815
10 changed files with 2034 additions and 78 deletions

View File

@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG CONFLUENCE_VERSION=7.4.0
ARG CONFLUENCE_VERSION=7.5.0
ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
##################################################################

View File

@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG CONFLUENCE_VERSION=7.4.0
ARG CONFLUENCE_VERSION=7.5.0
ARG DOWNLOAD_URL=http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-${CONFLUENCE_VERSION}.tar.gz
##################################################################

View File

@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG JIRA_VERSION=8.8.1
ARG JIRA_VERSION=8.9.0
ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz
##################################################################

View File

@ -5,7 +5,7 @@ ARG DEBIAN_FRONTEND=noninteractive
##################################################################
# ARGuments
##################################################################
ARG JIRA_VERSION=8.8.1
ARG JIRA_VERSION=8.9.0
ARG DOWNLOAD_URL=https://www.atlassian.com/software/jira/downloads/binary/atlassian-jira-software-${JIRA_VERSION}.tar.gz
##################################################################

View File

@ -0,0 +1,3 @@
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

View File

@ -1,9 +1,12 @@
FROM epicmorg/websites:php7.2
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="/opt/www/testrail/config/"
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/"
@ -16,74 +19,54 @@ LABEL vendor="TestRail" \
type="TestRail php-fpm apache image including ionCube loader." \
description="This is an image which runs apache php-fpm with ionCube for testrail."
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 /opt/www/testrail && \
unzip /tmp/testrail.zip -d /opt/www/ && \
rm /tmp/testrail.zip && \
chown -R www-data:www-data /opt/www/testrail && \
chown -R www-data:www-data /opt/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 echo "opcache.enable=1" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.enable=1" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.enable=1" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.enable=1" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.enable_cli=0" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.interned_strings_buffer=8" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.max_accelerated_files=10000" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.memory_consumption=128" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.max_wasted_percentage=10" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.save_comments=1" >> /etc/php/7.2/fpm/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/apache2/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/cgi/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/cli/php.ini && \
echo "opcache.validate_timestamps=0" >> /etc/php/7.2/fpm/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/apache2/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/cgi/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/cli/php.ini && \
echo ";opcache.revalidate_freq=16" >> /etc/php/7.2/fpm/php.ini && \
php -v
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
COPY testrail.conf /etc/apache2/sites-enabled/testrail.conf
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
##################################################################
# cleaninig up
##################################################################
RUN apt clean -y && \
apt autoclean -y && \
rm -rfv /etc/apache2/sites-enabled/000-default.conf && \
rm -rfv /var/lib/apt/lists/* && \
rm -rfv /var/cache/apt/archives/*.deb && \
rm -rfv /tmp/deb/* && \
rm -rfv /tmp/composer-setup.php && \
rm -rfv /tmp/ioncube.tar.gz
COPY php.ini /usr/local/etc/php/conf.d/php.ini
#volumes
#VOLUME ["/var/www/"]
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
# Add image configuration and scripts
COPY run.sh /run.sh
RUN chmod 755 /*.sh
RUN mkdir -p /apache-conf
VOLUME /apache-conf
# Configure application
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
WORKDIR /opt//www/testrail
CMD ["/run.sh"]

View File

@ -2,7 +2,7 @@
#ServerName www.example.com
ServerAdmin webmaster@localhost
DocumentRoot /opt/www/testrail
DocumentRoot /var/www/testrail
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

View File

@ -1,5 +1,4 @@
#!/bin/bash
#set -e
function createOptDirectory {
@ -12,12 +11,34 @@ function createOptDirectory {
chown -R www-data:www-data $1
}
rm -f /etc/apache2/sites-enabled/ssl_apache_testrail.conf
cp /apache-conf/000-default.conf /etc/apache2/sites-enabled/000-default.conf
if [ ! -z "$SSL" ]
then
echo
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 HTTPto HTTPS
a2enmod rewrite
cp -f /apache-conf/.htaccess /var/www/testrail/.htaccess
fi
createOptDirectory $TR_DEFAULT_LOG_DIR
createOptDirectory $TR_DEFAULT_AUDIT_DIR
createOptDirectory $TR_DEFAULT_REPORT_DIR
createOptDirectory $TR_DEFAULT_ATTACHMENT_DIR
chown -R www-data:www-data /var/www/testrail/config
echo "##############"
echo "Waiting for background task file"
while [ ! -f /var/www/testrail/task.php ]
@ -32,9 +53,4 @@ while /bin/true; do
done &
echo "##############"
rm -rfv /etc/apache2/sites-enabled/000-default.conf
chown -R www-data:www-data /var/www
chown -R www-data:www-data /var/www/testrail/config
source /etc/apache2/envvars
tail -F /var/log/apache2/* &
exec apache2 -D FOREGROUND
docker-php-entrypoint "$@"

1940
testrail/latest/php.ini Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,14 @@
<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>