Skip to content

Image storage

IDLD Server can be configured to store collected images in S3 storage service or filesystem. This functionality is optional and is only enabled if the IDLIVEDOC_SERVER_STORAGE_TYPE environment variable is defined. Available options are:

Note

Images are stored asynchronously without blocking the main processing thread.

Amazon S3

Use the following environment variables along the IDLIVEDOC_SERVER_STORAGE_TYPE=aws:

  • S3_TOKEN - public token from Amazon IAM account page;
  • S3_SECRET - private token counterpart;
  • S3_PATH - path inside bucket, e.g. "idld-server/saved-data";
  • S3_REGION - region where bucket operates;
  • S3_BUCKET - bucket name, e.g. "my.amazon.bucket";

Note

The S3_TOKEN and S3_SECRET variables are optional. The default AWS credential provider chain will be used if those are omitted.

Note

The path from S3_PATH variable should already exist inside the selected bucket.

$ docker run \
    -e IDLIVEDOC_SERVER_STORAGE_TYPE=aws \
    -e S3_TOKEN=my_public_token \
    -e S3_SECRET=my_secret_token \
    -e S3_PATH=idld-server/saved-data \
    -e S3_REGION=eu-central-1 \
    -e S3_BUCKET=audios
    ...

MinIO

Use the following environment variables along the IDLIVEDOC_SERVER_STORAGE_TYPE=minio:

  • S3-URL - S3 endpoint URL of the storage service;
  • S3_TOKEN - user's access key or username;
  • S3_SECRET - user's corresponding secret key or password;
  • S3_PATH - path inside bucket, e.g. "idld-server/saved-data";
  • S3_BUCKET - bucket name, e.g. "my.minio.bucket";

Note

The path from S3_PATH variable should already exist inside the selected bucket.

$ docker run \
    -e IDLIVEDOC_SERVER_STORAGE_TYPE=minio \
    -e S3_URL="http://mydomain.com/s3-endpoint" \
    -e S3_TOKEN=my_access_key \
    -e S3_SECRET=my_secret_key \
    -e S3_PATH=idld-server/saved-data \
    -e S3_BUCKET=audios
    ...

Filesystem

Use the following environment variables along the IDLIVEDOC_SERVER_STORAGE_TYPE=file-storage:

  • IDLIVEDOC_SERVER_STORAGE_FILE_STORAGE_PATH (optional) - path to directory to save data to. Defaults to /file-storage.
$ mkdir /host/directory/to/save/data
$ chmod a+rwx /host/directory/to/save/data # the directory must be accessible for the main process user in the container
$ docker run \
    -v /host/directory/to/save/data:/file-storage \
    -e IDLIVEDOC_SERVER_STORAGE_TYPE=file-storage
    ...