Closed andrew-jameson closed 1 year ago
cf run-task
as shown in the example from the docs (linked in the above article) but would need to ensure the application containing the new code has been deployed, which could pose problems if the app can't start up without the database migrations having taken effect.run-task
commands in circleci, then start the new app and finally roll over traffic. That would allow each step to be independently controlled, but might be more overhead than the out-of-the-box --rolling
deploy@Smithh-Co i think this can be closed as all the follow-on tickets have been discussed and prioritized.
Description: When deploying our app to cloudgov, we run the
gunicorn_start.sh
script as the manifest'scommand
, which is run to start up the application. Currently,gunicorn_start.sh
runs the following co-hosted operationsmakemigrations
migrate
populate_stts
collectstatic
celery
andbeat
gunicorn_start
Ideally, application startup should only consist of
gunicorn start
; all application dependencies would be handled by other steps in our pipeline. In some cases, such as when runningpython manage.py migrate
where the python code is needed in order to execute the step, this may be impractical. Investigate which of thegunicorn_start.sh
steps can be decoupled from application startup. Prioritize:Acceptance Criteria:
makemigrations
callmigrate
,populate_stts
, andcollectstatic
from other pipeline steps.Tasks:
migrate
,populate_stts
, andcollectstatic
celery
as a separate service/application is possible (a separately hosted repo with a REST api might be the only possibility).Notes:
makemigrations
makemigrations
on the production server creates the potential for untracked database changes.collectstatic
collectstatic
elsewhere and serving static files via a new nginxlocation
Supporting Documentation:
Open Questions: