GithubHelp home page GithubHelp logo

hakancunier / vroom-docker Goto Github PK

View Code? Open in Web Editor NEW

This project forked from vroom-project/vroom-docker

0.0 0.0 0.0 14 KB

Docker image for vroom and vroom-express

Dockerfile 79.19% Shell 20.81%

vroom-docker's Introduction

VROOM Docker image

This repo is work in progress until further notice,not recommended for usage yet. [11.03.2020]

This image includes all dependencies and projects needed to successfully run an instance of vroom-express on top of vroom. Within 2 minutes you'll have a routing optimization engine running on your machine.

docker run -dt --name vroom \
    -p 3000:3000 \
    -v $PWD/conf:/conf \ # mapped volume for config & log
    -e VROOM_ROUTER=ors \ # routing layer: osrm, libosrm or ors
    vroomproject/vroom-docker:v1.6.0

If you want to build the image yourself, run a

docker build -t vroomproject/vroom-docker:v1.6.0 --build-arg VROOM_RELEASE=v1.6.0 --build-arg VROOM_EXPRESS_RELEASE=v0.5.0 .

Note, you should have access to a self-hosted instance of OSRM or OpenRouteService for the routing server, see e.g. docker-compose.yml for an example.

Tagging

The tagging scheme follows the release convention of vroom and adds patch releases for vroom-express patch releases.

Customization

Environment variables

  • VROOM_ROUTER: specifies the routing engine to be used, osrm or ors. Default osrm.

The pre-configured host for the routing servers is localhost and port: 8080 for ORS, port: 5000 for OSRM.

Volume mounting

All relevant files are located inside the container's /conf directory and can be shared with the host. These include:

  • access.log: the server log for vroom-express
  • config.yml: the server configuration file, which gives you full control over the vroom-express configuration. If you need to edit the configuration, run docker restart vroom to restart the server with the new settings.

Add a -v $PWD/conf:/conf to your docker run command.

Note, the environment variable VROOM_ROUTER has precedence over the router setting in config.yml.

Build arguments

If you prefer to build the image from source, there are 2 build arguments:

Note, not all versions are compatible with each other

docker-compose

We include a docker-compose.yml in the project to get you started easily.

docker-compose up -d will pull the latest vroom-docker image and the latest openrouteservice docker image.

Routing Server

You have the option to use OpenRouteService or OSRM. However, the proper setup in Docker or docker-compose depends on how you run the routing server.

Routing server in local Docker container

If you started the routing layer in a separate Docker container via docker run, you'll have to start the vroom container on the host network by adding --net host. The disadvantage is that you'll have to assign vroom-express configured port on the host machine. If port 3000 is already occupied on your machine, configure a different port in config.yml.

Alternatively you can add both containers to a private Docker network and change the routing server host(s) to the routing server container name in config.yml before restarting the vroom container. However, the concepts involved are beyond the scope of this project.

Whole stack started with docker-compose

Make sure to include a network_mode: host in your vroom service section, which will have the same effect as adding --net host to a docker run statement.

Also here the alternative is to create a private Docker network where your services only publish the ports needed to run the stack. Note, you'll have to change the host(s) in config.yml to the service name(s) defined in docker-compose.yml.

Routing server on a remote server

In this case, you'll have to edit the mapped config.yml to include the host and port you published the routing server on.

vroom-docker's People

Contributors

nilsnolde 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.