Giter VIP home page Giter VIP logo

rulette-server's Introduction

Build Status

What is it?

Rulette server provides a REST API and a UI to interface with any MySQL backed rulette instances. This allows applications built on the non-Java stack to be able to use Rulette and a simple yet powerful out of the box UI to see and evaluate rules.

  • You can manage one or more Rulette instances in a single server deployment and use them in all the ways that you would use Rulette in-JVM.
  • Essentially, this allows you to expose your rule system(s) as a service.

Under the hood

Rulette Server is built using Spring Boot and Thymeleaf.

Build

To run the project via Maven, run the following command on the build directory:

mvn clean package

This will create an executable jar under the target folder with the name

rulette-server-{version}.jar

To run the jar file created via package

java -jar target/rulette-server-{version}.jar --spring.config.location={config-file-directory-path} --spring.config.name={config-file-name}

This is the standard syntax for passing external configurations to Spring Boot. Note that the config file name does not include the extension (.propertiers/.yml)

Configure

The external configuration file is used for some configuring Spring Boot itself (port number, log level etc) and also for specifying the Rulette instances to be loaded. You can use either properties file or YAML file to specify the propoerties.

A sample file (sample-application.yml) is included in the repository to show how Rulette configuration should be done.

Docker

Docker image for rulette-server is published on Docker Hub and can be downloaded bu running

docker pull kislayverma/rulette-server:0.0.1-SNAPSHOT

The tag should reflect the version you want to pull.

Building the Docker image

You can build the docker image by first building the project as described above and then running the follwing command:

docker build --build-arg JAR_FILE=target/rulette-server-0.0.1-SNAPSHOT.jar -t rulette-server .

You should the correct jarname generated from the maven build process as the JAR_FILE argument.

The generated docker image can now be be run as follows:

docker run -v /absolute-path-to-local/application.yml:/application.yml  -p 8081:8081  rulette-server

We are passing in a application.yml file located at the given path to the docker image. If you are trying to connect to a local MySQL server, you should use "host.docker.internal" as the MySQL IP address in the application.yml file.

rulette-server's People

Contributors

kislayverma avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.