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

WKHTMLTOPDF_OPTS and WKHTMLTOPDF_WORKDIR env variable #30

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

Conversation

lelmarir
Copy link

@lelmarir lelmarir commented Jul 18, 2019

WKHTMLTOPDF_OPTS env variable allow to add custom options to be applied for all requests,
WKHTMLTOPDF_WORKDIR allow to specify the directory for the html file (/tmp by default). This is usefull if the file references some external files by relative path (eg. fonts) that need to be in the same folder.

other minors:

  • single RUN -> only one layer instead of 2
  • remove tmp file

docker-compose.yml:

wkhtmltopdf-aas:
    image: openlabs/docker-wkhtmltopdf-aas
    build:
      context: .
    volumes:
     - ./static:/static
    environment:
     - WKHTMLTOPDF_OPTS=--disable-local-file-access --allow /static
     - WKHTMLTOPDF_WORKDIR=/static

lelmarir added 2 commits July 18, 2019 12:42
add static options form env and set work directory for wkhtmltopdf
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

Successfully merging this pull request may close these issues.

1 participant