The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(self-hosted): use named volumes for s3 and reduce redundancy
Andrey A.ac01c8139e5e
diff --git a/docker/docker-compose.rustfs.yml b/docker/docker-compose.rustfs.ymlindex 31a24b15de3..ab22fcc82ec 100644--- a/docker/docker-compose.rustfs.yml+++ b/docker/docker-compose.rustfs.yml@@ -16,7 +16,7 @@ services:timeout: 10sretries: 5volumes:- - ./volumes/storage:/data:z+ - rustfs-data:/data:zrustfs-createbucket:image: rustfs/rc@@ -30,59 +30,18 @@ services:"storage:- container_name: supabase-storage- image: supabase/storage-api:v1.37.8- restart: unless-stoppeddepends_on:- db:- # Disable this if you are using an external Postgres database- condition: service_healthy- rest:- condition: service_started- imgproxy:- condition: service_startedrustfs-createbucket:condition: service_completed_successfullyrustfs:condition: service_healthy- healthcheck:- test:- [- "CMD",- "wget",- "--no-verbose",- "--tries=1",- "--spider",- "http://storage:5000/status"- ]- timeout: 5s- interval: 5s- retries: 3environment:- ANON_KEY: ${ANON_KEY}- SERVICE_KEY: ${SERVICE_ROLE_KEY}- POSTGREST_URL: http://rest:3000- PGRST_JWT_SECRET: ${JWT_SECRET}- DATABASE_URL: postgres://supabase_storage_admin:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}- REQUEST_ALLOW_X_FORWARDED_PATH: "true"- FILE_SIZE_LIMIT: 52428800STORAGE_BACKEND: s3- # S3 bucket when using S3 backend, directory name when using 'file'- GLOBAL_S3_BUCKET: ${GLOBAL_S3_BUCKET}- # S3 Backend configurationGLOBAL_S3_ENDPOINT: http://rustfs:9000GLOBAL_S3_PROTOCOL: httpGLOBAL_S3_FORCE_PATH_STYLE: trueAWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER}AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}- #FILE_STORAGE_BACKEND_PATH: /var/lib/storage- TENANT_ID: ${STORAGE_TENANT_ID}- # TODO: https://github.com/supabase/storage-api/issues/55- REGION: ${REGION}- ENABLE_IMAGE_TRANSFORMATION: "true"- IMGPROXY_URL: http://imgproxy:5001- # S3 protocol endpoint configuration- S3_PROTOCOL_ACCESS_KEY_ID: ${S3_PROTOCOL_ACCESS_KEY_ID}- S3_PROTOCOL_ACCESS_KEY_SECRET: ${S3_PROTOCOL_ACCESS_KEY_SECRET}- #volumes:- # - ./volumes/storage:/var/lib/storage:z++volumes:+ rustfs-data:diff --git a/docker/docker-compose.s3.yml b/docker/docker-compose.s3.ymlindex cb3e25c3e75..c197b7dc060 100644--- a/docker/docker-compose.s3.yml+++ b/docker/docker-compose.s3.yml@@ -15,7 +15,7 @@ services:timeout: 10sretries: 5volumes:- - ./volumes/storage:/data:z+ - minio-data:/data:zminio-createbucket:image: cgr.dev/chainguard/minio-client:latest-dev@@ -29,59 +29,18 @@ services:"storage:- container_name: supabase-storage- image: supabase/storage-api:v1.37.8- restart: unless-stoppeddepends_on:- db:- # Disable this if you are using an external Postgres database- condition: service_healthy- rest:- condition: service_started- imgproxy:- condition: service_startedminio-createbucket:condition: service_completed_successfullyminio:condition: service_healthy- healthcheck:- test:- [- "CMD",- "wget",- "--no-verbose",- "--tries=1",- "--spider",- "http://storage:5000/status"- ]- timeout: 5s- interval: 5s- retries: 3environment:- ANON_KEY: ${ANON_KEY}- SERVICE_KEY: ${SERVICE_ROLE_KEY}- POSTGREST_URL: http://rest:3000- PGRST_JWT_SECRET: ${JWT_SECRET}- DATABASE_URL: postgres://supabase_storage_admin:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DB}- REQUEST_ALLOW_X_FORWARDED_PATH: "true"- FILE_SIZE_LIMIT: 52428800STORAGE_BACKEND: s3- # S3 bucket when using S3 backend, directory name when using 'file'- GLOBAL_S3_BUCKET: ${GLOBAL_S3_BUCKET}- # S3 Backend configurationGLOBAL_S3_ENDPOINT: http://minio:9000GLOBAL_S3_PROTOCOL: httpGLOBAL_S3_FORCE_PATH_STYLE: trueAWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER}AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}- #FILE_STORAGE_BACKEND_PATH: /var/lib/storage- TENANT_ID: ${STORAGE_TENANT_ID}- # TODO: https://github.com/supabase/storage-api/issues/55- REGION: ${REGION}- ENABLE_IMAGE_TRANSFORMATION: "true"- IMGPROXY_URL: http://imgproxy:5001- # S3 protocol endpoint configuration- S3_PROTOCOL_ACCESS_KEY_ID: ${S3_PROTOCOL_ACCESS_KEY_ID}- S3_PROTOCOL_ACCESS_KEY_SECRET: ${S3_PROTOCOL_ACCESS_KEY_SECRET}- #volumes:- # - ./volumes/storage:/var/lib/storage:z++volumes:+ minio-data: