Skip to content

intermine/modencode-site

Repository files navigation

A Flask app serving the homepage of the modENCODE project

Requirements:

  • Flask
  • CherryPy WSGI Server (for production)

Installation:

Make sure these are installed:

  • Flask easy_install flask
  • CherryPy easy_install cherrypy

Setup

  • Run the install script python install.py and choose the port the app will run at
  • Configure SMTP and other settings in config.py
  • Modify site constants as needed in models/constants.py

Running

Flask/Werkzeug Server (for development)

The app can be run through the Werkzeug WSGI server that comes with Flask. To run it, execute python flask_app.py. Provided you have set DEBUG = True in your config.py file, this option will give you an interactive debugger and your app will be reloaded if changes to source files are detected.

CherryPy WSGI Server (for production)

  1. Run ./start_server.sh. This will launch cherryd with settings coming from cherrypy.conf that uses an 'in-between' script create_flask_app.py to attach the Flask Object to the server
  2. A file, cherrypy.pid will be created that has the id of the process running
  3. Calling ./stop_server.sh will read the .pid file and kill the process waiting for child threads to terminate

Update from GitHub

Run ./github_update.sh to stop the running server, run a git pull and start the server again.

FAQ

How do I show a server down message?

  1. Have an RSS feed ready where the last item has the message you want to display in the title with a special trigger-tag in the message that modENCODE should look for.
  2. Look at constants.py file and modify the MESSAGING_RSS_URL constant to point to your RSS feed looking for a trigger-tag defined in MESSAGING_RSS_TAG.

How do I stop showing a server down message?

  1. Publish a new item in the RSS feed that will NOT have a trigger-tag in its title.

About

Homepage for the modENCODE project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •