Skip to content

Running An Instance

Mike Simms edited this page Apr 13, 2022 · 4 revisions

Requirements

  • A python interpreter (python 3)
  • A web server, such as ngnix, if you intend to use this in the real world.
  • An instance of mongodb (version 4)

Installing Your Own Server

The plan is to eventually provide a docker container for this. However, in the meantime, running the python setup.py script should resolve all language dependencies.

A mongodb database and a rabbitmq message queue are also needed. The database is for storing all the things, while the message queue is for assigning work to the analysis clients.

Starting the Server

Starting the server is quite straightforward. However, as the software is designed to work with multiple web frameworks as well as multiple mapping technologies, you will have to decide which ones are appropriate for your environment.

Supported Web Frameworks

  • cherrypy
  • flask

Supported Maps

  • Google Maps (requires an API key to be specified in the configuration file)
  • Open Street Maps

Options are specified in the configuration file. An example configuration file (openworkout.config) is included with the source.

Option 1 To run the web service under the cherrypy framework, the wsgi option is the preferred option if the app is sitting behind a proper web server, such as ngnix:

python start_cherrypy.py --config openworkout.config
or
python start_cherrypy_wsgi.py --config openworkout.config

Option 2 To run the web service under the flask framework:

python start_flask.py --config openworkout.config

Clone this wiki locally