This is a Google App Engine Flexible Environment Docker reference configuration for running the Athena PDF conversion service.
-
Install Docker for Mac
-
Kill any other apps running on localhost.
-
Run Docker Compose to start up the containers.
-d
to run containers in the background.$ docker-compose up -d $ docker-compose ps
-
Convert the GitHub homepage to a PDF.
$ open http://localhost:8080/convert?auth=arachnys-weaver&url=https://github.com
-
Convert an html file on your machine to PDF.
$ curl http://jargon-file.org/archive/jargon-1.5.0.dos.txt > jargon.txt $ curl -F "file=@jargon.txt" \ http://localhost:8080/convert?auth=arachnys-weaver \ > jargon.pdf
-
Teardown.
$ docker-compose down
$ gcloud projects list
$ gcloud set project=chocolate-covered-raisins
$ gcloud app deploy
$ gcloud app browse -s athenapdf
$ curl https://athenapdf-dot-chocolate-covered-raisins.appspot.com/convert?auth=arachnys-weaver
- Arachnys, thank you for open sourcing a great alternative to wkhtmltopdf.
- @MrSaints
- Jakob Truelsen