testrail fixes

This commit is contained in:
Anatolii Zimovskii 2022-01-25 21:05:07 +03:00
parent f8eb846294
commit c7542cb968
Signed by: stam
GPG Key ID: AA3A575AB99E8469
2 changed files with 10 additions and 3 deletions

View File

@ -7,6 +7,7 @@ ENV TR_DEFAULT_TASK_EXECUTION=60
ENV TESTRAIL_RELEASE_DIR=/testrail-release ENV TESTRAIL_RELEASE_DIR=/testrail-release
ENV TR_WWW_PATH=/var/www/testrail ENV TR_WWW_PATH=/var/www/testrail
ENV TR_CONFIGPATH=${TR_CONFIG_DIR}
ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config ENV TR_CONFIG_DIR=${TR_WWW_PATH}/config
ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom ENV TR_CUSTOM_DIR=${TR_WWW_PATH}/custom
ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth ENV TR_CUSTOM_AUTH_DIR=${TR_CUSTOM_DIR}/auth
@ -17,6 +18,9 @@ ENV TR_DEFAULT_AUDIT_DIR=${TR_OPT_PATH}/audit
ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports ENV TR_DEFAULT_REPORT_DIR=${TR_OPT_PATH}/reports
ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments ENV TR_DEFAULT_ATTACHMENT_DIR=${TR_OPT_PATH}/attachments
ENV TR_OPTPATH="/opt/testrail/"
ENV TR_CONFIGPATH="/var/www/testrail/config/"
ENV OPENSSL_CONF=/etc/ssl/ ENV OPENSSL_CONF=/etc/ssl/
RUN \ RUN \
@ -36,9 +40,10 @@ RUN \
wget --no-check-certificate -O ${TESTRAIL_RELEASE_DIR}/testrail.zip ${DOWNLOAD_URL} && \ 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 ${TESTRAIL_RELEASE_DIR} && \
unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \ unzip -o ${TESTRAIL_RELEASE_DIR}/testrail.zip -d /var/www/ && \
ls -las ${TR_WWW_PATH} && \
chown -R www-data:www-data ${TR_WWW_PATH} && \ chown -R www-data:www-data ${TR_WWW_PATH} && \
chown -R www-data:www-data ${TR_OPT_PATH} ls -las ${TR_WWW_PATH} && \
chown -R www-data:www-data ${TR_OPT_PATH} && \
ls -las ${TR_OPT_PATH}
COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf COPY apache_testrail.conf ${TESTRAIL_RELEASE_DIR}/apache-conf/000-default.conf

View File

@ -1,4 +1,5 @@
#!/bin/bash #!/bin/bash
#set -e #set -e
#env #env
@ -46,7 +47,8 @@ echo "[testrail] Background task stoped"
################################################################################# #################################################################################
if [[ -z "${FIX_WWW_DATA}" ]]; then if [[ -z "${FIX_WWW_DATA}" ]]; then
echo "[apache2] env FIX_WWW_DATA is not set. Skipping..." echo "[apache2] env FIX_WWW_DATA is not set. Fixing permissions anyway"
chown www-data:www-data /var/www -R
elif [ "${FIX_WWW_DATA}" == "false" ]; then elif [ "${FIX_WWW_DATA}" == "false" ]; then
echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..." echo "[apache2] env FIX_WWW_DATA is set to false. Skipping..."
elif [ "${FIX_WWW_DATA}" == "true" ]; then elif [ "${FIX_WWW_DATA}" == "true" ]; then