The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix(self-hosted): add s3 client config and fix minio config
Inder Singh26c615ca4a6f
diff --git a/docker/.env.example b/docker/.env.exampleindex b66761b81ca..31fd8c75167 100644--- a/docker/.env.example+++ b/docker/.env.example@@ -128,3 +128,17 @@ DOCKER_SOCKET_LOCATION=/var/run/docker.sock# Google Cloud Project detailsGOOGLE_PROJECT_ID=GOOGLE_PROJECT_IDGOOGLE_PROJECT_NUMBER=GOOGLE_PROJECT_NUMBER++############+# Storage - Configuration for the storage+############++STORAGE_TENANT_ID=stub+GLOBAL_S3_BUCKET=stub+REGION=stub+S3_PROTOCOL_ACCESS_KEY_ID=625729a08b95bf1b7ff351a663f3a23c+S3_PROTOCOL_ACCESS_KEY_SECRET=850181e4652dd023b7a98c58ae0d2d34bd487ee0cc3254aed6eda37307425907++# Used in docker-compose.s3.yml for minio+MINIO_ROOT_USER=supa-storage+MINIO_ROOT_PASSWORD=secret1234\ No newline at end of filediff --git a/docker/docker-compose.s3.yml b/docker/docker-compose.s3.ymlindex 043691a607b..b7f8a2c70be 100644--- a/docker/docker-compose.s3.yml+++ b/docker/docker-compose.s3.yml@@ -6,8 +6,8 @@ services:- '9000:9000'- '9001:9001'environment:- MINIO_ROOT_USER: supa-storage- MINIO_ROOT_PASSWORD: secret1234+ MINIO_ROOT_USER: ${MINIO_ROOT_USER}+ MINIO_ROOT_PASSWORD: ${MINIO_ROOT_PASSWORD}command: server --console-address ":9001" /datahealthcheck:test: [ "CMD", "curl", "-f", "http://minio:9000/minio/health/live" ]@@ -23,15 +23,14 @@ services:minio:condition: service_healthyentrypoint: >- /bin/sh -c "- /usr/bin/mc alias set supa-minio http://minio:9000 supa-storage secret1234;- /usr/bin/mc mb supa-minio/stub;- exit 0;+ /bin/sh -ec "+ mc alias set supa-minio http://minio:9000 ${MINIO_ROOT_USER} ${MINIO_ROOT_PASSWORD} &&+ mc mb --ignore-existing supa-minio/${GLOBAL_S3_BUCKET}"storage:container_name: supabase-storage- image: supabase/storage-api:v1.11.13+ image: supabase/storage-api:v1.37.1depends_on:db:# Disable this if you are using an external Postgres database@@ -40,8 +39,8 @@ services:condition: service_startedimgproxy:condition: service_started- minio:- condition: service_healthy+ minio-createbucket:+ condition: service_completed_successfullyhealthcheck:test:[@@ -50,7 +49,7 @@ services:"--no-verbose","--tries=1","--spider",- "http://localhost:5000/status"+ "http://storage:5000/status"]timeout: 5sinterval: 5s@@ -62,21 +61,24 @@ services:POSTGREST_URL: http://rest:3000PGRST_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- GLOBAL_S3_BUCKET: stub+ GLOBAL_S3_BUCKET: ${GLOBAL_S3_BUCKET}GLOBAL_S3_ENDPOINT: http://minio:9000GLOBAL_S3_PROTOCOL: httpGLOBAL_S3_FORCE_PATH_STYLE: true- AWS_ACCESS_KEY_ID: supa-storage- AWS_SECRET_ACCESS_KEY: secret1234+ AWS_ACCESS_KEY_ID: ${MINIO_ROOT_USER}+ AWS_SECRET_ACCESS_KEY: ${MINIO_ROOT_PASSWORD}AWS_DEFAULT_REGION: stubFILE_STORAGE_BACKEND_PATH: /var/lib/storage- TENANT_ID: stub+ TENANT_ID: ${STORAGE_TENANT_ID}# TODO: https://github.com/supabase/storage-api/issues/55- REGION: stub+ REGION: ${REGION}ENABLE_IMAGE_TRANSFORMATION: "true"IMGPROXY_URL: http://imgproxy:5001+ 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:zdiff --git a/docker/docker-compose.yml b/docker/docker-compose.ymlindex 98358df70a6..6fd37691c2d 100644--- a/docker/docker-compose.yml+++ b/docker/docker-compose.yml@@ -277,12 +277,14 @@ services:FILE_SIZE_LIMIT: 52428800STORAGE_BACKEND: fileFILE_STORAGE_BACKEND_PATH: /var/lib/storage- TENANT_ID: stub+ TENANT_ID: ${STORAGE_TENANT_ID}# TODO: https://github.com/supabase/storage-api/issues/55- REGION: stub- GLOBAL_S3_BUCKET: stub+ REGION: ${REGION}+ GLOBAL_S3_BUCKET: ${GLOBAL_S3_BUCKET}ENABLE_IMAGE_TRANSFORMATION: "true"IMGPROXY_URL: http://imgproxy:5001+ S3_PROTOCOL_ACCESS_KEY_ID: ${S3_PROTOCOL_ACCESS_KEY_ID}+ S3_PROTOCOL_ACCESS_KEY_SECRET: ${S3_PROTOCOL_ACCESS_KEY_SECRET}imgproxy:container_name: supabase-imgproxy