Docker Service, Convert Form Submission to PDF
docker build -t skarvelis/fio2pdf:1.0 .
You can use enviroment variables
docker run -e FORMIO_ADMIN_EMAIL="[email protected]" -e FORMIO_ADMIN_PASSWORD="something" -p6112:6112 -d skarvelis/fio2pdf:1.0
or a config file
docker run -v ${PWD}/config.json:/config.json -p6112:6112 -d skarvelis/fio2pdf:1.0
- look at
config.json.template
for available variables.
You have to post the form and submition id,for example:
{
"submission":{
"_id":"5b44c168347456002cd7b425",
"form":"5b37565f076e80002c4969f6"
}
}
curl --header "Content-Type: application/json" \
--request POST \
--data '{"submission":{"_id":"5b44c168347456002cd7b425",form":"5b37565f076e80002c4969f6"}}' \
https://localhost:6112/ -o form.pdf
- note the / at the end!