-
Notifications
You must be signed in to change notification settings - Fork 6
Deploying to production
Django requires some additional steps in order to be safety deployed at production environments. Most of them were covered since we start using cherrypy as a WSGI. Some additional steps might be required in order to really go to production:
To change server's IP/FQDN address or listening port number do:
Linux:
./run.sh [IP/FQDN]:[port]
Windows:
./run.bat [IP/FQDN]:[port]
Example:
./run.sh 192.168.0.1:80
will serve the Catalog to any source address at 192.168.0.1 IP address via the port number 80.
Now we have a cherrypy WSGI support that solves most problems due to port this project to production. Technically it is ready to go to production, but you might be interesting in some security tips, so here we go:
- Create the folder
base/ssl
and set the permissions accordingly.
mkdir -p base/ssl
- Edit the file
base/run_cherrypy.py
: Open it by using your favorite editor and change the following lines accordingly:
# For SSL Support
# server.ssl_module = 'builtin'
# server.ssl_certificate = 'ssl/certificate.cer'
# server.ssl_private_key = 'ssl/private.key'
# server.ssl_certificate_chain = 'ssl/bundle.pem'
Then import your certificate material accordingly.
For more security settings, please check Django's official documentation here and here.
After that, review the settings at base/base/settings.py
file.
Proudly made in .