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

PDF/CSV export #115

Open
sebek72 opened this issue Sep 22, 2023 · 5 comments
Open

PDF/CSV export #115

sebek72 opened this issue Sep 22, 2023 · 5 comments

Comments

@sebek72
Copy link

sebek72 commented Sep 22, 2023

I am having issues with PDF export on icingaweb2 pages (does not work out of the box).
Enabling the PDFexport module google-chrome is needed in the docker image. Can this be added as default to the Dockerfile?

Dokerfile diff
`-RUN ["bash", "-exo", "pipefail", "-c", "export DEBIAN_FRONTEND=noninteractive; apt-get update; apt-get install --no-install-{recommends,suggests} -y apache2 ca-certificates libapache2-mod-php7.4 libldap-common locales-all php-{imagick,redis} php7.4-{bcmath,bz2,common,curl,dba,enchant,gd,gmp,imap,interbase,intl,json,ldap,mbstring,mysql,odbc,opcache,pgsql,pspell,readline,snmp,soap,sqlite3,sybase,tidy,xml,xmlrpc,xsl,zip}; apt-get clean; rm -vrf /var/lib/apt/lists/*"]

+RUN ["bash", "-exo", "pipefail", "-c", "export DEBIAN_FRONTEND=noninteractive; apt-get update; apt-get install --no-install-{recommends,suggests} -y wget apache2 ca-certificates libapache2-mod-php7.4 libldap-common locales-all php-{imagick,redis} php7.4-{bcmath,bz2,common,curl,dba,enchant,gd,gmp,imap,interbase,intl,json,ldap,mbstring,mysql,odbc,opcache,pgsql,pspell,readline,snmp,soap,sqlite3,sybase,tidy,xml,xmlrpc,xsl,zip}; wget -q https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb; apt-get install --no-install-recommends -y ./google-chrome-stable_current_amd64.deb; rm google-chrome-stable_current_amd64.deb; apt-get clean; rm -vrf /var/lib/apt/lists/*"]`

The downside is that the image size jumps from around 700MB to 1.1GB

@Al2Klimov
Copy link
Member

Hi,

Does Chromium work as well for you?

@sebek72
Copy link
Author

sebek72 commented Sep 27, 2023

Does not reduce the image size.

@sebek72
Copy link
Author

sebek72 commented Feb 9, 2024

Now another issue is the CVS export runs out of memory.
Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in /usr/share/icinga-php/ipl/vendor/composer/ClassLoader.php on line 576

@sebek72 sebek72 changed the title PDF export PDF/CSV export Feb 9, 2024
@sebek72
Copy link
Author

sebek72 commented Feb 13, 2024

Problem solved by increasing the memory_limit to 256M in docker container php config.
Another problem persists: Icinga/icingadb-web#972

@Al2Klimov
Copy link
Member

Pro: the module starts the browser by itself, so it has to be in the same image

Cons:

  • apt install --no-install-{recommends,suggests} chromium : After this operation, 592 MB of additional disk space will be used.
  • One can easily craft a derived image:
FROM icinga/icingaweb2
USER root
RUN ["bash", "-exo", "pipefail", "-c", "export DEBIAN_FRONTEND=noninteractive; apt-get update; apt-get install --no-install-{recommends,suggests} -y chromium; apt-get clean; rm -vrf /var/lib/apt/lists/*"]
USER www-data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants