Skip to content

Commit

Permalink
chore(supabase): Increases supabase-storage file size and makes it co…
Browse files Browse the repository at this point in the history
…nfigurable (#775)

* Increases the file upload size to 512Mb from 50Mb in supabase-storage. This size limits how large the files are that we can use for file uploads and by proxy RAG.
* Adds Zarf variable to configure the value at deploy time.
* 512Mb matches what OpenAI allows for the files upload endpoint
  • Loading branch information
CollectiveUnicorn committed Jul 19, 2024
1 parent 3187b58 commit 0c01f36
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
7 changes: 7 additions & 0 deletions packages/supabase/bitnami-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,13 @@ storage:
resourcesPreset: "none"
podLabels:
sidecar.istio.io/inject: "false"
extraEnvVars:
# FILE_SIZE_LIMIT and UPLOAD_FILE_SIZE_LIMIT do the same thing, Supabase has a primary and fallback variable,
# so we have opted to set both of the variables to the same value.
- name: FILE_SIZE_LIMIT
value: "###ZARF_VAR_MAX_FILE_UPLOAD_SIZE_IN_BYTES###"
- name: UPLOAD_FILE_SIZE_LIMIT
value: "###ZARF_VAR_MAX_FILE_UPLOAD_SIZE_IN_BYTES###"

studio:
enabled: ###ZARF_VAR_ENABLE_STUDIO###
Expand Down
3 changes: 3 additions & 0 deletions packages/supabase/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ variables:
- name: ENABLE_EXTERNAL_KEYCLOAK
description: 'Enable the integration between Supabase and an external keycloak instance be enabled'
default: "true"
- name: MAX_FILE_UPLOAD_SIZE_IN_BYTES
description: 'The maximum upload file size for Supabase storage in bytes, default is equivalent to 512Mb'
default: "536870912"

components:
- name: supabase
Expand Down
2 changes: 1 addition & 1 deletion src/leapfrogai_api/supabase/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ port = 54324
[storage]
enabled = true
# The maximum file size allowed (e.g. "5MB", "500KB").
file_size_limit = "50MiB"
file_size_limit = "512MiB"

[auth]
enabled = true
Expand Down
2 changes: 1 addition & 1 deletion src/leapfrogai_ui/supabase/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ port = 54324
[storage]
enabled = true
# The maximum file size allowed (e.g. "5MB", "500KB").
file_size_limit = "50MiB"
file_size_limit = "512MiB"

[auth]
enabled = true
Expand Down

0 comments on commit 0c01f36

Please sign in to comment.