Can you install git on Amazon and push assets (js, css, img) easily? Something like Heroku but with assets and S3 would be awesome.
Some people seem to use JungleDisk to sync a local git directory to s3, but that's too bulky. I tried installing jgit on a mac but to no avail, and that thing looks ancient. Is there anything else or does this type of thing just not work?
I've tried most of the gems out there for heroku asset deployment/optimization, but they all either require you to host them on heroku, or to run a rake task, which is not ideal.
To upload folders and files to an S3 bucketSign in to the AWS Management Console and open the Amazon S3 console at https://console.aws.amazon.com/s3/ . In the Buckets list, choose the name of the bucket that you want to upload your folders or files to. Choose Upload.
Build from SourceClone git-s3-push and cd into the repo root. Run go build cmd/git-s3-push.go , which will create a git-s3-push binary in your working directory. You can also skip the build step and use go run cmd/git-s3-push.go .
You can use s3cmd --sync LOCAL s3://BUCKET/PREFIX to accomplish this. It is best if each asset has a version number in its name. Otherwise you can have weird issues such as the browser caching version 1 of the CSS and using version 2 of the JavaScript, causing undefined behavior.
How about setting up an EC2 image, mounting the s3 image on there and setting up a bare git repository to push to on said S3 image?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With