Skip to content
This repository has been archived by the owner on Jan 12, 2023. It is now read-only.

mecodia/docker-weasyprint

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

docker-weasyprint

This is a very simple Dockerfile based on Alpine Linux. It creates a very small (105MB+) weasyprint service. It uses a wsgi server by aquavitae to provide weasyprint as a web service.

A sample docker-compose configuration is as follows:

services:
    weasyprint:
        build: .
        ports:
          - '5001:5001'
    command: ["uwsgi", "--http-socket", "0.0.0.0:5001", "--module", "wsgi:application", "--show-config"]

To use, POST some HTML to localhost:5001/pdf. The response will be a rendered pdf file.

Health Checks

A GET to localhost:5001/health should result in an ok response.

A GET to localhost:5001/version should output the weasyprint version (currently 0.39).

Fonts

In order to make fonts available to weasyprint, simply copy them into ./fonts and build the image.

About

Alpine-based weasyprint docker image

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 94.8%
  • Makefile 4.3%
  • Dockerfile 0.9%