Skip to content

Latest commit

 

History

History
39 lines (30 loc) · 1.89 KB

README.md

File metadata and controls

39 lines (30 loc) · 1.89 KB

Graphviz Renderer - Web

What is this?

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

How does it work?

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

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

Deployment

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.

Deploy using Google Cloud Platform

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

Contact

Josh Hayes-Sheen, grevian@gmail.com