Skip to content

Commit 61b9f83

Browse files
committed
[feature] Support third-party S3 providers
Fixes #151 Specify the endpoing via AWS_ENDPOINT=“…” and optionally enforce path-style access via S3_FORCE_PATH_STYLE=“true”
1 parent 6231f6b commit 61b9f83

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

.env.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ MLH_SECRET="bar"
33
AWS_BUCKET="foo"
44
AWS_ACCESS_KEY_ID="abc"
55
AWS_SECRET_ACCESS_KEY="123"
6-
AWS_REGION="bar"
6+
AWS_REGION="us-east-1"
7+
AWS_ENDPOINT=""
78
SPARKPOST_API_KEY="foo"

app.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,11 @@
4646
"AWS_REGION": {
4747
"description": "AWS Secret Access Key to store resumes via S3",
4848
"value": "us-east-1",
49+
"required": false
50+
},
51+
"AWS_ENDPOINT": {
52+
"description": "If you are using an S3-compliant storage provider, specify its custom endpoint here. Otherwise leave blank.",
53+
"value": "",
4954
"required": true
5055
},
5156
"ROLLBAR_ACCESS_TOKEN": {

config/storage.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,9 @@ amazon:
1212
secret_access_key: <%= ENV["AWS_SECRET_ACCESS_KEY"] %>
1313
region: <%= ENV["AWS_REGION"] %>
1414
bucket: <%= ENV["AWS_BUCKET"] %>
15+
<% if ENV["AWS_ENDPOINT"].present? %>
16+
endpoint: <%= ENV["AWS_ENDPOINT"] %>
17+
<% end %>
18+
<% if ENV["S3_FORCE_PATH_STYLE"] == "true" %>
19+
force_path_style: true
20+
<% end %>

0 commit comments

Comments
 (0)