Deploy without restarting container when possible
Related to #45 (closed)
- Avoid downtime on deploy by running a script inside the container instead of restarting the container
- ...unless the Dockerfile, docker-compose, or anything copied into the container have changed. Then build and restart the container like before
- If doing the latter, print the output from startup.sh, so if there's a problem we can easily see it from gitlab
- Don't clear static files when running collectstatic to avoid a situation when they're missing for a few seconds. Even after the new static files are there, people will request the old ones for awhile due to caching. Instead, to prevent them from accumulating indefinitely, I have a short script (written in python for sanity) that will delete all but the two newest versions of each compiled file.
Edited by Josh Wier