Commit d4cc747b authored by HERBERT Ryan's avatar HERBERT Ryan

Added documentation for deploying to production

Simply a list of pitfals and steps to ensure deploying to production is
a smooth process.
parent d3efe5e2
* Introduction
When manipulating a production environment it is important to take certain
precautionnary mesures, in order to ensure production can either be rolled
back to a previous version or simply that any encurred loss of data can be
retrieved.
Web2py and Vidjil are no exception to this rule.
* Making backups
Performing an Analysis in Vidjil is time-consuming, therefore should the
data be lost, valuable man-hours are also lost.
In order to prevent this we make regular incremental (?) backups of the
data stored on the vidjil servers.
This not only applies to the fiels uploaded and created by vidjil, but also
to the database.
* Autodelete and Permissions
Web2py has a handy feature called AutoDelete which allows the administrator
to state that file reference deletions should be cascaded if no other
references to the file exist.
When deploying to production one needs to make sure AutoDelete is
deactivated.
As a second precaution it is also wise to temporarily restrict web2py's
access to referenced files.
Taking two mesures to prevent file loss might seem like overkill, but
securing data is more important than the small amount of extra time spent
putting these mesures into place.
* Deploying the server
Currently deploying changes to production is analogous to merging into the
rbx branch and pulling from the server.
Once this has been done, it is important that any database migrations have
been applied.
This can be verified by refreshing the server (calling a controller) and
then looking at the database.
* Step by Step
- Set AutoDelete to False
- Check permissions on the uploads folder (set to 100)
- you can also check the amount of files present at this point for future
reference
- Backup database: Archive old backup.csv and then from admin page: backup
db
- pull rbx (if already merged dev)
- Check the database (for missing data or to ensure mmigrations have been
applied)
- Check files to ensure no files are missing
- Reset the folder permissions on uploads (755 seems to be the minimum
requirement for web2py)
- Run unit tests (Simply a precaution: Continuous Integration renders this
step redundant but it's better to be sure)
- Check site functionnality
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment