feat(supabase): make storage S3 backend configurable via env - #85
Open
Carlos-Vera wants to merge 1 commit into
Open
feat(supabase): make storage S3 backend configurable via env#85Carlos-Vera wants to merge 1 commit into
Carlos-Vera wants to merge 1 commit into
Conversation
The template ships the S3 backend settings as commented-out literals, so switching storage to S3 means editing the compose file by hand. That does not survive on platforms like EasyPanel, where the service is sourced from git and the file is rewritten on every deploy. Expose them as environment variables instead, keeping 'file' as the default so existing deployments are unaffected. docker-compose.s3.yml stays as-is: it wires up a local MinIO with a fixed endpoint, which does not cover an external S3-compatible service. Also adds TUS_ALLOW_S3_TAGS: Cloudflare R2 does not implement x-amz-tagging, and resumable (TUS) uploads fail with HTTP 500 unless it is set to "false". Autor: Carlos Vera <carlos@braveslab.com> --- “Todo lo puedo en Cristo que me fortalece.” fil 4:13
Carlos-Vera
marked this pull request as ready for review
September 7, 2026 08:57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The Supabase template ships the S3 backend settings as commented-out literals:
So pointing storage at an external S3-compatible service means editing the compose file
by hand. On platforms like EasyPanel the service is sourced from git and the file is
rewritten on every deploy, so the edit is lost. And since no service in this template
uses
env_file, only what the YAML declares underenvironment:ever reaches thecontainer — setting these in the platform's env UI has no effect.
docker-compose.s3.ymldoes not cover this case: it wires up a local MinIO with a fixedGLOBAL_S3_ENDPOINT: http://minio:9000.Change
Expose the five settings as environment variables, keeping
fileas the default soexisting deployments are unaffected, and document them in
.env.example.Also adds
TUS_ALLOW_S3_TAGS(defaulttrue, unchanged behaviour): Cloudflare R2 doesnot implement
x-amz-tagging, and resumable (TUS) uploads fail with HTTP 500 unless itis set to
"false".Verification
Default deployments resolve exactly as before; only an explicit
STORAGE_BACKEND=s3changes anything.
Running in production on a Supabase self-host serving ~29k images from Cloudflare R2.
By Carlos Vera of BravesLab
con el favor de nuestro señor JesusCristo.