améliorations
This commit is contained in:
parent
7f957140ea
commit
0a656d32f1
|
@ -29,7 +29,7 @@ Nous préférons l'installer via les packages `.deb` fournis avec des librairies
|
|||
> libfontenc1 libfreetype6 libjpeg62-turbo libpng12-0 libxfont1 libxrender1 ucf \
|
||||
> x11-common xfonts-75dpi xfonts-base xfonts-encodings xfonts-utils
|
||||
> # wget https://downloads.wkhtmltopdf.org/0.12/0.12.5/wkhtmltox_0.12.5-1.jessie_amd64.deb
|
||||
> # apt install wkhtmltox_0.12.5-1.jessie_amd64.deb
|
||||
> # dpkg -i wkhtmltox_0.12.5-1.jessie_amd64.deb
|
||||
> ~~~
|
||||
|
||||
|
||||
|
@ -59,7 +59,7 @@ voir <https://github.com/wkhtmltopdf/wkhtmltopdf/issues/2193#issuecomment-136962
|
|||
|
||||
## wkhtmltopdf as a service
|
||||
|
||||
Utilisation avec Node JS inspirée de <https://github.com/traum-ferienwohnungen/docker-wkhtmltopdf-aas/blob/master/Dockerfile>
|
||||
Utilisation avec [Node JS](HowtoNodeJS) inspirée de <https://github.com/traum-ferienwohnungen/docker-wkhtmltopdf-aas/blob/master/Dockerfile>
|
||||
|
||||
~~~
|
||||
# su - foo
|
||||
|
@ -90,3 +90,36 @@ $ GET http://foo:PASSWORD@localhost:5555/healthcheck
|
|||
$ GET http://foo:PASSWORD@localhost:5555/status
|
||||
~~~
|
||||
|
||||
### gestion via systemd
|
||||
|
||||
On définit un script `start.sh` :
|
||||
|
||||
~~~
|
||||
#!/bin/sh
|
||||
|
||||
export USER='foo'
|
||||
export PASS='PASSWORD'
|
||||
export PAYLOAD_LIMIT='200mb'
|
||||
|
||||
umask 027
|
||||
|
||||
cd /foo/bar
|
||||
npm start
|
||||
~~~
|
||||
|
||||
Et une unité [systemd](HowtoSystemd) du type :
|
||||
|
||||
~~~
|
||||
[Unit]
|
||||
Description=wkhtmltopdf service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Restart=always
|
||||
User=foo
|
||||
Group=foo
|
||||
ExecStart=/foobar/start.sh
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
~~~
|
Loading…
Reference in a new issue