-
Notifications
You must be signed in to change notification settings - Fork 8
3. Production Notes
For a production deployment of Judge, a few extra configurations are necessary.
The Flask SECRET_KEY value should be changed. A default value is provided in the config.py
file:
DEBUG = False
ALLOW_CONFIG = True
POLL_TIMEOUT = 5
SERVICES_FILE = 'services.yaml'
# These values are overriden by defining them again in instance/config.py
SECRET_KEY = 'supersecretkey'
As suggested in that file, your production SECRET_KEY value should be defined in a new file: instance/config.py
You will need to create the config.py
file as well as the instance/
folder.
Secondly, in the original config.py
file, the ALLOW_CONFIG
value should be set to False
. This disables Judge's configuration page and does not allow for post-launch configuration of Judge. This allows you to deploy the webpage publicly, without fear of competitors changing the scoring rules. Keep in mind this means that Judge must be configured through the services.yaml
file.
Judge is a python Flask application and utilizes the development web server that ships with Flask for non-production uses. Judge should be run under a more mature web server for production uses such as Apache or Nginx.
Flask provides documentation for deploying Flask apps under Apache here. Details for deployment specific to Judge will be added here in the near future.
Judge utilizes the python celery
package for polling services as background processes. Production servers should have these background processes supervised by a daemon such as supervisord
.
Details specific to Judge on how to deploy celery
using supervisord
will be added here in the near future.