Sign inSign up

ogndocker/ogn-gateway-stats

By ogndocker

•Updated about 8 years ago

A ready to launch OGN gateway with statistics plugin

Image
0

1.2K

ogndocker/ogn-gateway-stats repository overview

⁠ogn-gateway-stats

A Docker⁠ image containing ogn-gateway deployed together with the ogn-gateway-stats⁠ plugin.

⁠The docker file⁠

⁠How to Use This Image

⁠The simplest
$ docker run -d ogndocker/ogn-gateway-stats

Note If you run it as described above the gateway will be logging all the data to a log folder inside the container. It will also create the statistics database inside. Fine, but most likely you may want to change that. You can do it simply by mounting external volume for the logs as well as for the stats db.

⁠Specify where you want the logs and stats db to be written placed
$ docker run -it -v 'C:/tmp/ogn/ogn-gateway/log/:/var/log/ogn-gateway' \
-v 'C:/tmp/ogn/stats-db:/db' --rm -h ogn-gateway \
--name ogngateway-stats \
-e OGN_GATEWAY_LOG_DIR=/var/log/ogn-gateway \
-e OGN_GATEWAY_STATS_DB_PATH=/db/ogn-stats.db \
-p 61628:61628 ogndocker/ogn-gateway-stats

 
In the above example, we run ogn-gateway-stats container and C:\tmp\ogn-gateway\log volume will be mounted (all the logs will be written there). C:/tmp/ogn/stats-db volume will also be mounted (mount point /db) and the statistics plugin will create and write its sqlite database there. We also expose expose TCP port 61628 , so that the ogn-gateway process can be introspected via JMX⁠

⁠Using docker-compose

Create your docker-compose.yml

version: '2'
services:
  ogn-gateway-stats:
    image: ogndocker/ogn-gateway-stats:latest
    hostname: ogn-gateway-stats
    environment:
      - OGN_GATEWAY_LOG_DIR=/var/log/ogn-gateway
      - OGN_GATEWAY_STATS_DB_PATH=/db/ogn-stats.db
    ports:
      - "61628:61628"
    volumes:
      - "C:/tmp/ogn/ogn-gateway/log/:/var/log/ogn-gateway"
      - "C:/tmp/ogn/stats-db:/db"

 
(Note: of course update the volume paths accordingly to your needs)

Then (while in the folder where your docker-compose.yml file is located) run:

	$ docker-compose up -d

⁠Environment variables

Like in the above example, you can tune the default behavior of the gateway, by passing some environment variables (either directly or in your docker-compose file

  • OGN_GATEWAY_STATS_DB_PATH - in order to set where the statistics plugin should create (or look for) its sqlite database

Since this image extends ogn-gateway-java⁠ use it as reference for the description of the remaining environment variables.

⁠License

This project is MIT Licensed⁠.

Tag summary

Content type

Image

Digest

Size

66.3 MB

Last updated

about 8 years ago

docker pull ogndocker/ogn-gateway-stats