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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker: Fix PDF library & viewing #301

Open
wants to merge 2 commits into
base: production
Choose a base branch
from

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Dec 18, 2019

I was having trouble with the PDF generation functionality, and it looks like the wkhtmltopdf library wasn't loaded correctly. I'm not entirely sure updating this in the docker is correct (or if this was just an issue with my install), but this fixed the issues for me.

When generating an invoice, I hit this error:

wkhtmltopdf: error while loading shared libraries: libXrender.so.1: cannot open shared object file: No such file or directory

So this PR updates the docker setup to install the Debian 9 (stretch) version of wkhtmltopdf, which does not rely on linked resources (see the note about generic builds). I also updated the nginx configuration to serve .pdf files from the uploads directory.

Note: I'm not sure that Debian 9 is actually the correct OS- it's what I've got, but it looks like the php:7.2-fpm base should be installing Debian 10.

To test

  1. Try generating a doc or a ticket invoice
  2. It should work 馃帀
  3. You should be able to load the invoice from the site

(not requesting reviews since I haven't take the time to test a clean install yet, but anyone should feel free to comment 馃檪 )

@ryelle ryelle added the [Component] Tooling Build tools, automated testing, source control, linting, etc label Dec 18, 2019
@ryelle ryelle self-assigned this Dec 18, 2019
@timiwahalahti
Copy link
Collaborator

Just tested this, and it worked when the URL of the package was changed. It would be nice to get this merged and Docker env also working on this part!

@timiwahalahti
Copy link
Collaborator

WordCamp Docs also need libxrender1 for wkhtmltopdf to work. So adding apt-get install libxrender1 is required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Tooling Build tools, automated testing, source control, linting, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants