-
Notifications
You must be signed in to change notification settings - Fork 0
Configuration Cloud Storage
Photosphere supports S3-compatible storage for both local and cloud deployments. You can use AWS S3, DigitalOcean Spaces, MinIO, or any S3-compatible service.
I recommend Digital Ocean Spaces because it works well, relatively simply to configure and is cost effective. For detailed instructions on setting up Digital Ocean Spaces, see Configuration-Digital-Ocean-Spaces.
There are three ways to provide S3 credentials:
Register your database with psi dbs add and link an S3 credentials secret to it. Credentials are then resolved automatically whenever you reference the database by name:
psi dbs add # follow the prompts, create or pick an S3 credentials secret
psi summary --db my-photos # credentials resolved automaticallySee Managing-Databases and Managing-Secrets for details.
When you run a command that accesses an S3 path for the first time and no credentials are found, psi will prompt you to configure them. You will be asked for a name (defaulting to "S3 credentials") and the credential fields. The credentials are stored in the vault under the key default:s3 and reused on subsequent runs. They are visible in psi secrets list.
export AWS_ACCESS_KEY_ID=<your-access-key-id>
export AWS_SECRET_ACCESS_KEY=<your-secret-key>
export AWS_REGION=us-east-1
export AWS_ENDPOINT=https://syd1.digitaloceanspaces.com # non-AWS S3 onlyWhen these are set, no vault lookup is performed and the lazy prompt is skipped.
Once configured, you can use S3 paths directly in commands:
# Replicate a local database to S3
psi replicate --db my-photos --dest s3:my-bucket/photos
# Initialize an empty database in S3
psi init --db s3:my-bucket/photos
# Add files to S3-backed database
psi add --db s3:my-bucket/photos ~/Pictures/*.jpgTo remove stored credentials, use psi secrets remove and select the secret to remove.