Skip to content

Latest commit

 

History

History
82 lines (52 loc) · 4.02 KB

File metadata and controls

82 lines (52 loc) · 4.02 KB

Standalone server for the Epsilon Playground

This Micronaut application project provides a unified distribution of the Epsilon Playground that includes both its frontend and its backend. This makes it especially convenient for deploying at a small scale (e.g. within an educational institution).

Additional endpoints

  • POST /shorturl: allows for storing work locally and retrieving it later.
  • GET /swagger/epsilon-playground-core-0.0.yml: returns the OpenAPI specification for the core endpoints.

The server also includes a copy of the Swagger UI at /swagger-ui, pointing at the core endpoints by default.

Additional options

  • PLAYGROUND_EPSILON_URL: URL to the service running Epsilon scripts. The default is to use the server's own implementation.
  • PLAYGROUND_FLEXMI2PLANTUML_URL: URL to the service running the Flexmi to PlantUML transformation. The default is to use the server's own implementation.
  • PLAYGROUND_EMFATIC2PLANTUML_URL: URL to the service running Epsilon scripts. The default is to use the server's own implementation.
  • PLAYGROUND_SHORT_URL: URL to the service running Epsilon scripts. The default is to use the server's own implementation, which uses a local folder. When using this default, the following environment variable applies:
    • PLAYGROUND_SHORT_FOLDER: absolute path to the folder that should store the contents to be shared. This is the shorturl subfolder of the current working directory by default when running directly via Gradle or from the uber-JAR.
  • PLAYGROUND_YJS_URL: URL to the yjs live collaboration server. This defaults to a demo server provided by the Yjs project, but we recommend pointing it to your own instance: we have a Dockerized version available here.
  • PLAYGROUND_KROKI_URL: URL to the Kroki server that produces diagrams from textual descriptions. This defaults to the public demo server, but again, we recommend that you run your own local instance if possible.

Running from Gradle

To run the standalone Playground server locally, run:

../gradlew run

You can then try out the Playground through:

http://localhost:8080/

The Swagger UI is also available here:

http://localhost:8080/swagger-ui

Running from the uber JAR

If you have Java installed, you can run the tool server from its uber-JAR. For instance, if you built it yourself:

java -jar build/libs/standalone-server-0.1-SNAPSHOT-all.jar

You can download the latest -all.jar directly from Github Packages.

Running from Docker

To run the standalone Playground server directly from Docker, run:

docker run --rm -p 8080:8080 ghcr.io/epsilonlabs/playground-backend/standalone-server

Note that the default implementation of "Share" in this image will use the /var/share/shorturl folder within the Docker container. This means that unless you use a bind mount or a volume, you would lose all shared work once the container was destroyed.

For example, you could run this command to bind the shorturl folder in your host system to /var/share/shorturl within the container:

docker run --rm -v ./shorturl:/var/share/shorturl -p 8080:8080 ghcr.io/epsilonlabs/playground-backend/standalone-server

Besides the latest tag, other tags are supported. See the full list.

Running from Docker Compose

This project includes a Docker Compose compose.yml file which will start a local copy of the playground, as well as local instances of Yjs and Kroki, and keep "Share" files in a named Docker volume.

To use it, run this command from this directory:

docker compose up -d

After some time, the local playground will be accessible from:

http://localhost:8080