[RUBY] Check file size before deploying

Check the size of the file.

I tried to deploy using ECR on AWS but it took a long time to build and push. The cause of this was that the file was too large.

du -sh ./*/

You can check the file size for each directory with this command. It's lighter now, but initially there were about 7G public directors.

スクリーンショット 2021-01-05 13.56.36.png

It was caused by the packs folder in the public folder, which is where the assets generated by Webpacker are stored.

Old files are no longer needed, so it's a good idea to delete the unwanted files in the public/packs folder once before deploying.

Recommended Posts

Check file size before deploying
Rotate by file size of logback