Skip to content

monodot/diagonal

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Project licence Egg Status

diagonal

A simple diagram generator API, built using Plantuml and Quarkus.

There is an accompanying front-end for this application which can be found at diagonal-fe.

Prerequisites

  • JDK
  • Maven
  • Graphviz

Running locally

To run using Maven:

mvn compile quarkus:dev

To build and run in a container:

mvn package
docker build -f src/main/docker/Dockerfile.jvm -t monodot/diagonal .
docker run -i --name diagonal --rm -p 8080:8080 monodot/diagonal

And to test locally - this will save the image to a file, target/output.png:

curl -v -H "Content-Type: source/plain" \
    -H "skin: modern" \
    --data-binary @samples/sequence.puml \
    --output target/output.png \
    http://localhost:8080/diagram/standard

curl -v -H "Content-Type: application/json" \
    --data-binary @src/test/data/samplerequest.json \
    http://localhost:8080/diagrams/standard

To build and run as a native image in a container (NB: this is not working right now unfortunately! dang!):

export GRAALVM_HOME=/opt/java/graalvm
mvn package -Pnative
docker build -f src/main/docker/Dockerfile.native -t monodot/diagonal .
docker run -i --name diagonal --rm -p 8080:8080 monodot/diagonal