-
Notifications
You must be signed in to change notification settings - Fork 4
April 2021
Néstor Nápoles López edited this page Apr 7, 2021
·
2 revisions
- There is a deployment checklist in django, which indicates what things you should be covering before having a production environment
- Raised several issues related to this checklist in cantus
- Django secret key is now generated when creating the container
- Peer review of the commit is encouraged if someone wants to read it
- I also added an environment variable for settings the DEVELOPMENT/PRODUCTION quality of the container
- The idea, for the time being, is that launching from VBox providers is considered development, and launching from OpenStack providers is considered production.
- Staging in ComputeCanada is ALSO PRODUCTION, for the purpose of these settings.
- We are living a transition in python web apps from wsgi to asgi
- I read the ASGI projects and they don't seem super stable yet, but it seems in the future everyone will be using ASGI and WSGI will be deprecated, unless I misunderstand something
- For now, I am deploying with WSGI (gunicorn)
- In the future, it shouldn't be difficult to integrate an ASGI app, but someone has to pay attention to that and do it
- I wrote an nginx config file to serve the static files of the application and proxy the web application itself to gunicorn
- It works, but there is a problem with the MIME type of the static files (css and js). This seems to be in our end, because we named the files
.min.css
and.min.js
, which is not recognized by nginx as the proper extension. - It seems it's not difficult to change the build settings of our front end to rename the output. We also need to change the django templates so that they refer to the new names.