1
0
Fork 0
mirror of https://github.com/maybe-finance/maybe.git synced 2025-07-19 05:09:38 +02:00

Support for Cloudflare R2

This commit is contained in:
Josh Pigford 2024-10-08 13:05:45 -05:00
parent 3461182725
commit 78b0674052
2 changed files with 16 additions and 0 deletions

View file

@ -86,3 +86,11 @@ GITHUB_REPO_BRANCH=main
# S3_SECRET_ACCESS_KEY=
# S3_REGION= # defaults to `us-east-1` if not set
# S3_BUCKET=
#
# Cloudflare R2
# =============
# ACTIVE_STORAGE_SERVICE=cloudflare
# CLOUDFLARE_ACCOUNT_ID=
# CLOUDFLARE_ACCESS_KEY_ID=
# CLOUDFLARE_SECRET_ACCESS_KEY=
# CLOUDFLARE_BUCKET=

View file

@ -13,6 +13,14 @@ amazon:
region: <%= ENV["S3_REGION"] || "us-east-1" %>
bucket: <%= ENV["S3_BUCKET"] %>
cloudflare:
service: S3
endpoint: https://<%= ENV['CLOUDFLARE_ACCOUNT_ID'] %>.r2.cloudflarestorage.com
access_key_id: <%= ENV['CLOUDFLARE_ACCESS_KEY_ID'] %>
secret_access_key: <%= ENV['CLOUDFLARE_SECRET_ACCESS_KEY'] %>
region: auto
bucket: <%= ENV['CLOUDFLARE_BUCKET'] %>
# Removed in #702. Uncomment, add gems, update .env.example to enable.
#google:
# service: GCS