0
votes

I'm confusion with heroku static assets. Have a task that sounds like "restore data with static assets from production(not big data and static(images) about 200mb) to heroku staging". Our production server outside of heroku. We decide test with real data and static assets from production, that's why we create free app in heroku.

So, when we push, heroku compile the assets and move its somewhere to S3 cloud. Is there way to stupidly upload our static assets to that amazon cloud, which heroku by default uploads when we push? Or what i not understand in this case?

Found information, that we can create account in amazone and with bucket serve assets static. But i'm interesting use default heroku assets host without creating account in amazon.

Project written in Ruby on Rails 3.2, db: pgsql

I think, that i correctly outlined what i want

Thanks!

1

1 Answers

0
votes

I am not quite sure what you are asking, but I am pretty sure the default operation is for Heroku to precompile static assets and serve them from your web server on there. It's true Heroku is an abstraction over AWS, so your Rails web server (e.g. Thin, WEBrick, etc.) is somewhere in the cloud. But that's a different matter from using Amazon CloudFront as a CDN for your static assets, which is the preferred approach.

In other words, there is a difference between serving your static assets from your web server (which happens to be on AWS but shouldn't be your concern--yay for abstraction) and serving your static assets from a CDN on AWS.

Given your situation, I would set up an S3 bucket and a Cloudfront distribution based on the bucket and configure AssetSync accordingly so Heroku (or you manually) pushes your assets there.