Skip to content
Pablo Ojanguren edited this page Mar 20, 2017 · 1 revision

Create data directories

There are some directories that will give access to configuration and log

  • /usr/local/etc/demo-swellrt - configuration files
  • /var/local/log/demo-swellrt - log files

Run image

Start the image with the following command

docker run -v /usr/local/etc/demo-swellrt:/usr/local/swellrt/config \
-v /var/local/log/demo-swellrt:/usr/local/swellrt/log \
--name demo-swellrt -h demo-swellrt.p2pvalue.eu -p 127.0.0.1:9898:9898 -d p2pvalue/swellrt

Restart image

docker pull p2pvalue/swellrt
docker stop demo-swellrt
docker rm demo-swellrt
# -> run the Run image command

Using MongoDB

Create data directories

MongoDB files can be stored in the host machine. We will put them at /var/local/lib/swellrt-demo/db

  • /var/local/lib/swellrt-demo/db - MongoDB data files

Create and run mongodb image

docker run --name demo-swellrt-mongo -v /var/local/lib/swellrt-demo/db:/data/db -d mongo

Then you must edit /usr/local/etc/demo-swellrt/server.config and configure SwellRT to use the mongodb backend whenever you want.

Change also the mongodb_host property to demo-swellrt-mongo

mongodb_host = demo-swellrt-mongo

Run image

Finally, exec the run command with the --link demo-swellrt-mongo:mongo option

Access mongo using console

See what instances are running

docker ps

Get the IP address of the instance

docker inspect <name>

Run mongo command with the IP

mongo --host <ip>