Skip to content

Storage

You can configure IAD Server to send copies of request payloads to Amazon S3, MinIO or save them to a filesystem.

The storage used is controlled by the environment variable IAD_SERVER_STORAGE_TYPE. Available values are aws, minio, file-storage.

Amazon S3

To store images to Amazon S3 set IAD_SERVER_STORAGE_TYPE to aws. You also need to specify:

  1. Name of an S3 bucket and its AWS region. The bucket with this name must already exist.

  2. AWS Access Key ID and Secret Access Key for the user that has access to the bucket.

docker run \
    --env IAD_SERVER_STORAGE_TYPE=aws \
    --env S3_REGION=eu-central-1 \
    --env S3_BUCKET=idliveface \
    --env S3_TOKEN=AKIAI44QH8DHBEXAMPLE \
    --env S3_SECRET=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY \
    ...

Additionally you can set a path inside the bucket with the S3_PATH variable.

MinIO

S3 connector also supports MinIO. To use it set IAD_SERVER_STORAGE_TYPE to minio. It has the same setup, you only need to specify a MinIO's url instead of the S3 region:

docker run \
    --env IAD_SERVER_STORAGE_TYPE=minio \
    --env S3_URL=http://192.168.1.51 \
    --env S3_BUCKET=idliveface \
    --env S3_TOKEN=AKIAI44QH8DHBEXAMPLE \
    --env S3_SECRET=je7MtGbClwBF/2Zp9Utk/h3yCo8nvbEXAMPLEKEY \
    ...

File storage

To save images to local directory set IAD_SERVER_STORAGE_TYPE to file-storage. The images will be stored to the /file-storage directory in the running container. Use a volume if you want persist the files after the container's restart.

The local directory must provide write permissions so that the container can write files to it. Here is one way to configure write permissions for Linux:

chmod 772 ./file-storage