#23 Resolves Create CD Pipeline for the master project
#23 (closed)
ClosesAdds new deploy
to the CD pipeline which deploys the current version of the code to heroku @ ybc.herokuapp.com
Notes
Adds two new pipeline variables, HEROKU_API_KEY
which is a long-life token for the admin@yes.org.uk account which has access to my ybc
webapp which is what the site is deployed to. Also adds PRODUCTION_BACKEND_SECRET_KEY
which is added to a json file which is created as part of the pipeline and loaded by the web app in production to make sure that the secret key is not a part of our code base for obvious security reasons.
Basic workflow of the pipeline is to completely mutate the repo to a flat django application which is then sent to a the heroku remote git connection which updates the heroku deployment. This is done by building the frontend, copying all the required django apps to backend folder, deleting frontend, moving the contents of backend to the same level as backend, deleting the remaining backend folder, then committing to the connected heroku remote.
This leaves a directory structure of
cs11_backend <- the cs11 backend with the wsgi.py file as the master project
has not been created (due to no current need)
media <- empty directory for user submitted files
frontend_build <- static frontend files that get moved to static/ as part of
deployment
yes_project_core_be <- models and settings
Procfile <- defines heroku deployment jobs
runtime.txt <- defines what version of python heroku runs with
LICENSE.txt <- GPLv3 referenced by code files
.gitignore <- ignores so very unnecessary files like pycache and db.sqlite3,
but not migrations as needed for heroku deployment pipelines
<other misc files>