Skip to content
Snippets Groups Projects
Commit 073822c4 authored by jurgenhaas's avatar jurgenhaas
Browse files

#26 Add new feature to support wkhtmltox

parent 981dca0c
No related branches found
No related tags found
No related merge requests found
......@@ -237,6 +237,9 @@ class Handler {
'dest' => $projectRoot . '/drush',
'add2yaml' => TRUE,
],
'wkhtmltox.sh' => [
'dest' => $projectRoot . '/.docker-init',
]
];
}
......@@ -325,6 +328,9 @@ class Handler {
'webgrind' => [
'enable' => 0,
],
'wkhtmltox' => [
'enable' => 0,
],
], $extra['docker4drupal']);
return $options;
}
......
......@@ -48,6 +48,9 @@ services:
{% endif %}
{% if webgrind.enable %}
- files:/mnt/files
{% endif %}
{% if wkhtmltox.enable %}
- './.docker-init/wkhtmltox.sh:/docker-entrypoint-init.d/50-wkhtmltox.sh'
{% endif %}
extra_hosts:
- '{{ projectname }}.docker.localhost:{{ docker0.ip }}'
......
#!/usr/bin/env sh
apk add --no-cache xvfb ttf-freefont fontconfig dbus
apk add qt5-qtbase wkhtmltopdf --no-cache --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
mv /usr/bin/wkhtmltopdf /usr/bin/wkhtmltopdf-origin
echo "#!/usr/bin/env sh" >/usr/bin/wkhtmltopdf
echo "Xvfb :0 -screen 0 1024x768x24 -ac +extension GLX +render -noreset &" >>/usr/bin/wkhtmltopdf
echo "DISPLAY=:0.0 wkhtmltopdf-origin $@" >>/usr/bin/wkhtmltopdf
echo "killall Xvfb" >>/usr/bin/wkhtmltopdf
chmod +x /usr/bin/wkhtmltopdf
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment