Skip to content

Data Storage

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

Note

Data is stored asynchronously without blocking the main processing thread.

Amazon S3

Use the following environment variables along the IDVOICE_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. "idvoice-server/saved-data";
  • S3_REGION - region where bucket operates;
  • S3_BUCKET - bucket name, e.g. "my.amazon.bucket";
  • S3_UPLOADER_ROLE_ARN (optional) - the ARN of the Role to be assumed.

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 IDVOICE_SERVER_STORAGE_TYPE=aws \
    -e S3_TOKEN=my_public_token \
    -e S3_SECRET=my_secret_token \
    -e S3_PATH=idvoice-server/saved-data \
    -e S3_REGION=eu-central-1 \
    -e S3_BUCKET=audios 

MinIO

Use the following environment variables along the IDVOICE_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. "idvoice-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 IDVOICE_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=idvoice-server/saved-data \
    -e S3_BUCKET=audios 

Filesystem

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

  • IDVOICE_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 \
    --volume /host/directory/to/save/data:/file-storage \
    -e IDVOICE_SERVER_STORAGE_TYPE=file-storage