Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add changes for chromium-based (headless) pdf generation for TR on Docker #66

Open
wants to merge 9 commits into
base: reportingperformanceandscalability_master
Choose a base branch
from
14 changes: 14 additions & 0 deletions Dockerfiles/testrail_apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ ENV TR_DEFAULT_ATTACHMENT_DIR="/opt/testrail/attachments/"
ENV OPENSSL_CONF="/etc/ssl/"
ENV LDAP_CONF_DIR="/etc/ldap/"
ENV LDAP_CONF_FILE="$LDAP_CONF_DIR/ldap.conf"
ENV TR_CHROMIUM_PATH="/usr/bin/chrome-headless-shell-linux64/chrome-headless-shell"

LABEL vendor="TestRail" \
maintainer="Christian Breitwieser" \
Expand Down Expand Up @@ -98,6 +99,19 @@ RUN ( cd /tmp && \
./configure && \
make install \
)

RUN ( cd /tmp && \
apt-get update && \
apt install -y libnss3 libatk1.0-0 libxcomposite1 libxdamage1 libxrandr2 libgbm1 libxkbcommon0 libasound2 libatk-bridge2.0-0 libxfixes3 && \
wget https://storage.googleapis.com/chrome-for-testing-public/131.0.6778.69/linux64/chrome-headless-shell-linux64.zip && \
unzip "chrome-headless-shell-linux64.zip" && \
mv chrome-headless-shell-linux64 /usr/bin && \
chown www-data:www-data /usr/bin/chrome-headless-shell-linux64/* -R && \
chown www-data:www-data /usr/bin/chrome-headless-shell-linux64 && \
chmod 775 /usr/bin/chrome-headless-shell-linux64/* -R && \
chmod 775 /usr/bin/chrome-headless-shell-linux64 \
)

RUN rm -rf /tmp/php-driver
RUN mkdir -p /apache-conf
VOLUME /apache-conf
Expand Down
3 changes: 3 additions & 0 deletions docker-compose_documented.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ services:
# See volumes mapping below
volumes:
- 'testrail_mysql:/var/lib/mysql'

# For Testrail versions supporting Chromium-based PDF generation, you can mount the folder containing the chromium binary as follows
# - ./chrome-headless-shell-linux64:/usr/bin/chrome-headless-shell-linux64

# With these environment variables, the database is initialized upon its first start.
# A database and a user with password are automatically created. The user is assigned full access rights to the created database.
Expand Down
4 changes: 4 additions & 0 deletions quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@ echo " Keyspace: 'tr_keyspace'"
echo " User: 'cassandra'"
echo " Password: 'cassandra'"

echo
echo " CHROMIUM PATH (For Testrail versions that supports Chromium-based PDF Generation)"
echo " Chromium Headless Shell Path: '/usr/bin/chrome-headless-shell-linux64/chrome-headless-shell'"

echo
echo " Application Settings"
echo " - Simply leave the default values for the folders 'logs, reports, attachments and audit'."
Expand Down