annotate frontends/wsgi.py @ 7340:7b9bddda9d2d

Add support for demo mode in docker. roundup/demo.py Make changes to allow exposed port in docker to be specified separately from the port that demo mode binds to. Also permit bind address specification as well. roundup/scripts/roundup_demo.py: Update required by changes in demo.py. Also move away from positional arguments to prefer flag arguments. Required for passing port and host specification. Flake8 fixes. share/man/man1/roundup-demo.1 Document use of option flags rather than positional params. Other cleanups. doc/installation.txt: Document new docker modes: demo, shell and admin. Update docs: overview section - reorg, added template info for the impatient section - added docker demo mode reference, more docs on top level demo.py use. new section on docker demo mode removed getting roundup section. folded into installing roundup. also prior for the impatient section describes how to download. install via pip in venv recommended supported method document all provided templates. not just minimal and classic. added index references. move sections around, decreased sectin depth, reformatting scripts/Docker/roundup_healthcheck: When running roundup-demo, there is no tracker spec. So default to demo if no tracker=directory args found. Prevent's docker from reporting an unhealthy container when running demo. scripts/Docker/roundup_start: implement demo, shell, admin docker modes.
author John Rouillard <rouilj@ieee.org>
date Sun, 14 May 2023 09:43:53 -0400
parents 285d9adfefdb
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6390
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
1 # If you installed roundup to the system locations
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
2 # using pip you don't need to change this
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
3 # section. If you installed roundup in a custom
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
4 # location, uncomment these lines and change the
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
5 # path in the append() method to your custom path.
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
6 #import sys
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
7 #sys.path.append('/custom/location/where/roundup/is/installed')
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
8
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
9 # Obtain the WSGI request dispatcher
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
10 from roundup.cgi.wsgi_handler import RequestDispatcher
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
11
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
12 # Set the path to tracker home.
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
13 tracker_home = '/path/to/tracker'
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
14
6747
d32d43e4a5ba wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents: 6390
diff changeset
15 # Enable the feature flag to speed up wsgi response by caching the
d32d43e4a5ba wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents: 6390
diff changeset
16 # Roundup tracker instance on startup. See upgrading.txt for
d32d43e4a5ba wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents: 6390
diff changeset
17 # more info.
d32d43e4a5ba wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents: 6390
diff changeset
18 feature_flags = { "cache_tracker": "" }
d32d43e4a5ba wsgi can cache tracker instance enabled by feature flag.
John Rouillard <rouilj@ieee.org>
parents: 6390
diff changeset
19
6390
7c852cad2ca8 Add wsgi.py to frontends. Update docs.
John Rouillard <rouilj@ieee.org>
parents:
diff changeset
20 # Definition signature for app: app(environ, start_response):
6776
285d9adfefdb Update comment to allow use with mod_wsgi
John Rouillard <rouilj@ieee.org>
parents: 6772
diff changeset
21 # If using apache mod_wsgi change app to application.
6772
fde9fe504ebd fix syntax error.
John Rouillard <rouilj@ieee.org>
parents: 6747
diff changeset
22 app = RequestDispatcher(tracker_home, feature_flags=feature_flags)

Roundup Issue Tracker: http://roundup-tracker.org/