A ready to launch OGN gateway with statistics plugin
1.2K
A Docker image containing ogn-gateway deployed together with the ogn-gateway-stats plugin.
$ 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.
$ 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
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
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
Since this image extends ogn-gateway-java use it as reference for the description of the remaining environment variables.
This project is MIT Licensed.
Content type
Image
Digest
Size
66.3 MB
Last updated
about 8 years ago
docker pull ogndocker/ogn-gateway-stats