@@ -54,38 +54,33 @@ To switch between OIDC realms you'll need to set the modify the following values
5454
5555By default ` OIDC_ISSUER ` and ` REALM ` are configured for the CSH members realm.
5656
57- Authorization
58- -------------
59-
60- Authentication happens via pyOIDC with CSH SSO, authenticating as the user who is viewing the page.
61- We have two different realms, and the site changes depending which realm is in use.
62-
63- The server uses heavy caching via lru_cache to speed up the results as much as possible
64-
65- Setup
66- ------
67-
68- For local development setup follow these steps:
57+ ## Usage
58+ To run packet using the flask dev server use this command:
59+ ``` bash
60+ python3 wsgi.py
61+ ```
62+ The Flask debug mode flag can be set using via the config system explained above.
6963
70- 1 . ``` pip install -r requirements.txt ```
71- 2 . ` Create config.py ` or set environment variables
72- - Several of these variables require keys and information, please reach out to an RTP for testing information
73- 3 . Run ` wsgi.py `
64+ Alternative you can run it through [ gunicorn ] ( https://gunicorn.org/ ) using this command:
65+ ``` bash
66+ gunicorn -b :8000 packet:app --access-logfile -
67+ `` `
7468
69+ ### CLI
70+ Packet makes use of the Flask CLI for exposing functionality to devs and admins. This is primarily designed to be used
71+ locally with the target DB set via the server's config values.
7572
76- Commands
77- --------
73+ To use the CLI just set the project up as normal and then run the ` flask ` command in the project's root directory.
74+ It'll automatically load up the app and show you a list of available commands. For more details on a particular command
75+ use the help flag like this:
76+ ``` bash
77+ flask {command} --help
78+ ```
7879
79- The flask CLI provides all the methods needed to setup a packet and a packet season
80+ ** WARNING: ** Be sure to double check which DB you're pointed at when using one of the admin or DB commands.
8081
81- ```
82- create-packets Creates a new packet season for each of the freshmen in the given CSV.
83- create-secret Generates a securely random token.
84- db Perform database migrations.
85- ldap-sync Updates the upper and misc sigs in the DB to match ldap.
86- sync-freshmen Updates the freshmen entries in the DB to match the given CSV.
87- fetch-results Fetches and prints the results from a given packet season.
88- ```
82+ All DB commands are from the ` Flask-Migrate ` library and are used to configure DB migrations through Alembic. See their
83+ docs [ here] ( https://flask-migrate.readthedocs.io/en/latest/ ) for details.
8984
9085Code Standards
9186------------
0 commit comments