Skip to content

Commit

Permalink
[feature] Support third-party S3 providers
Browse files Browse the repository at this point in the history
Fixes #151

Specify the endpoing via AWS_ENDPOINT=“…” and optionally enforce path-style access via S3_FORCE_PATH_STYLE=“true”
  • Loading branch information
sman591 committed May 21, 2019
1 parent 6231f6b commit 61b9f83
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ MLH_SECRET="bar"
AWS_BUCKET="foo"
AWS_ACCESS_KEY_ID="abc"
AWS_SECRET_ACCESS_KEY="123"
AWS_REGION="bar"
AWS_REGION="us-east-1"
AWS_ENDPOINT=""
SPARKPOST_API_KEY="foo"
5 changes: 5 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@
"AWS_REGION": {
"description": "AWS Secret Access Key to store resumes via S3",
"value": "us-east-1",
"required": false
},
"AWS_ENDPOINT": {
"description": "If you are using an S3-compliant storage provider, specify its custom endpoint here. Otherwise leave blank.",
"value": "",
"required": true
},
"ROLLBAR_ACCESS_TOKEN": {
Expand Down
6 changes: 6 additions & 0 deletions config/storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,9 @@ amazon:
secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
region: <%= ENV["AWS_REGION"] %>
bucket: <%= ENV["AWS_BUCKET"] %>
<% if ENV["AWS_ENDPOINT"].present? %>
endpoint: <%= ENV["AWS_ENDPOINT"] %>
<% end %>
<% if ENV["S3_FORCE_PATH_STYLE"] == "true" %>
force_path_style: true
<% end %>

0 comments on commit 61b9f83

Please sign in to comment.