This is a dockerized replacement for the GraphViz functionality of the Google Image Charts API, which I've been using as a backend for graphs.grevian.org up until April of 2020 despite it being marked deprecated in 2012, and being "turned off" in 2019
Run the server or deploy the docker container and make POST requests to service:8080/chart with a
Content-Type header of application/x-www-form-urlencoded and a body containing the following 3 parameters
chofOutput format, must bepngfor nowchtChart type, can be one ofcirco, dot, fdp, neato, nop, nop1, nop2, osage, patchwork, sfdp, twopi- See the Layout Manual Pages in the graphviz documentation for details
chlA dot formatted graph description to be rendered, click here to see some examples
The response will be a simple png image with the rendered graph and a 200 status, or a 400 or 500 status with a
plaintext error message
This service can be built in a local go environment, or using the included Dockerfile,
it listens on port 8080 by default and that can be overridden with a PORT environment variable.
Build the container using Google Cloud Build, and push it to a project registry
gcloud builds submit --tag gcr.io/[PROJECT_ID]/gv-renderer
Deploy the container via Google Cloud Run
gcloud run deploy --image gcr.io/[PROJECT_ID]/gv-renderer --platform managed --memory=64 --max-instances=5
Josh Hayes-Sheen, [email protected]