Coder Social home page Coder Social logo

hannesolszewski / opentripplanner-starter Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mathisburger/opentripplanner-starter

0.0 0.0 0.0 1.17 MB

An application wrapper for the OpenTripPlanner to use it in a production environment

License: MIT License

Rust 100.00%

opentripplanner-starter's Introduction

OTP Starter

A simple CLI application that is used to run the OpenTripPlanner in an production environment without the required overhead of handling process IDs and struggling arround to run it as a deamon.

How it works

The application uses the unmodified releases of the OTP. It is just ab abstraction layer onto the CLI of the executable .jar file that is used to run the server and perform all the necessary operations. It starts the application using nohup to run it as a deamon. It is stopped by just fetching the process ID of the running server and terminating the JVM that runs the server.

System requirements

This application does not work in windows.

You will need:

  • Java 17
  • Linux/UNIX based operating system

How to use it

First you will have to download the latest release from the releases tab.

After that you can add it to your /usr/local/bin folder or leave it in the directory. If you decide to leave it in the directory you downloaded it into, you will be forced everytime to provide the full path to the executable if you want to run it.

After that go into the folder you want to use as your folder for the OTP installation

This folder should contain:

  • A version of OTP
  • A directory that contains all your data like GTFS files, etc.

Now create a file named otp-starter.toml in this directory and use this configuration schema:

# The amount of memory that is assigned to the JVM that runs the OTP
memory_limit = "10G"
otp_jar = "./otp-2.4.0-shaded.jar"

[http]
# The HTTP port that uses the application
port = 8081
# The HTTPS port that uses the application
secure_port = 8083
# The bind address that is required
bind_address = "0.0.0.0"

[path]
# The relative/absolute path to the data directory
data_dir = "./data"
# The relative/absolute path to the directory that contains
# the graphs.
graph_dir = "./graphs"

Now you are ready to launch your application.

If you want to start it directly and build the graph on startup just run this command:

otp-starter start -bos

If you prefer to build a graph before use these commands:

otp-starter buildGraph && otp-starter start

If you want to stop all running OTP instances just use

otp-starter stop

opentripplanner-starter's People

Contributors

mathisburger avatar hannesolszewski 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.