-
Notifications
You must be signed in to change notification settings - Fork 2
HOWTO Store files in S3
Tree photos take a lot of space. A single photo can take around 4-5 Mb. A site with many trees can require a lot of disk space, which might not be available or might not be cheap at the hosting server. It is more convenient to use an S3 compatible file storage. Using an S3 compatible storage as file storage allows one to run a large and busy tree map on small hardware.
When an S3 compatible storage is used, files are stored in that storage, and read from there, bypassing the local file system altogether.
To enable the S3 file storage, the following environment variables need to be defined:
AWS_ACCESS_KEY_ID=secret
AWS_SECRET_ACCESS_KEY=secret
S3_BUCKET=treemap1-bucket
S3_REGION=fra1
S3_ENDPOINT=https://fra1.digitaloceanspaces.com
If the site was previously running with the local storage, those files can be moved to S3 (after the remote storage is successfully configured) using the following command:
treemap upload-files