Choose between Cloudfalre R2, AWS S3, Google Cloud Storage, or Azure Blob Storage
service-go-user/domain/file/provider.go
file.
The local provider stores files in a local folder, while the other providers store files in their respective cloud storage services.
docker-compose.yml
file.
Cloudflare R2
, AWS S3
, Google Cloud Storage
, Azure Blob Storage
and Local (folder)
.
r2
, s3
, gcs
, azblobl
and local
.
docker-compose.yml
file:
r2
, set R2_ENDPOINT
, R2_ACCESS_KEY
, and R2_SECRET_KEY
.s3
, set S3_REGION
, S3_ACCESS_KEY
, and S3_SECRET_KEY
.gcs
, set GOOGLE_APPLICATION_CREDENTIALS
.azblob
, set AZBLOB_ACCOUNT_NAME
and AZBLOB_ACCOUNT_KEY
.local
, set FILE_DIR
.R2
dashboard, click on Manage R2 API Tokens
and create a new token.R2_ENDPOINT
, R2_ACCESS_KEY
, and R2_SECRET_KEY
in the docker-compose.yml
file.AmazonS3FullAccess
policy.S3_REGION
, S3_ACCESS_KEY
, and S3_SECRET_KEY
in the docker-compose.yml
file.Storage Admin
role.GOOGLE_APPLICATION_CREDENTIALS
in the docker-compose.yml
file.Access keys
section and copy the Connection string
.AZBLOB_ACCOUNT_NAME
and AZBLOB_ACCOUNT_KEY
in the docker-compose.yml
file.