-
Notifications
You must be signed in to change notification settings - Fork 30
Production Runbook
Stuart Olivera edited this page Dec 14, 2017
·
7 revisions
Some notes on maintaining the website in production.
Rails and Dokku don't clean up old assets (css, js, images, etc) by itself. This means that on every deploy that an asset changes, both the new and old asset are kept on disk. Over time this can build up to a lot of excess, old assets.
Every once in a while, it's good to purge all assets and regenerate only the current ones.
Warning: this is a destructive, uptime-affecting action. Assets will throw a 404 error until the recompilation step is completed.
- SSH into the Dokku VM, and
dokku enter brickhack-stage web
- From the shell, run
rails assets:clobber
. This will essentially rm -rf public/assets/ - Immediately after, run
rails assets:precompile
. This will regenerate the current assets. - Exit the shell by entering
exit
. Dokku might not kill the temporary shell container otherwise.