tigrish / redmine_s3

Uses Amazon S3 for storing attachments
50 stars 84 forks source link

Run s3.yml through erb for ENV variables #11

Closed JangoSteve closed 12 years ago

JangoSteve commented 12 years ago

This allows you to define your s3 credentials using ERB and Heroku's config variables, so that you're not checking sensitive data into source control.

For example, using this fork, my s3.yml file looks like this:

production:
  access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
  secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
  bucket: <%= ENV['S3_BUCKET'] %>
  endpoint:
  secure: true
  private: 
  expires: 

This should be backwards compatible with the existing s3.yml direct format since ERB would simply not find any erb to parse out.