Loading environment variables
imgproxy can load environment variables from various sources such as:
Local file
You can create an environment file and configure imgproxy to read environment variables from it.
IMGPROXY_ENV_LOCAL_FILE_PATH
: the path of the environment file to load
AWS Secrets Manager
You can store the content of an environment file as an AWS Secrets Manager secret and configure imgproxy to read environment variables from it.
IMGPROXY_ENV_AWS_SECRET_ID
: the ARN or name of the secret to loadIMGPROXY_ENV_AWS_SECRET_VERSION_ID
: (optional) the unique identifier of the version of the secret to loadIMGPROXY_ENV_AWS_SECRET_VERSION_STAGE
: (optional) the staging label of the version of the secret to loadIMGPROXY_ENV_AWS_SECRET_REGION
: (optional) the region of the secret to load
info
If both IMGPROXY_ENV_AWS_SECRET_VERSION_ID
and IMGPROXY_ENV_AWS_SECRET_VERSION_STAGE
are set, IMGPROXY_ENV_AWS_SECRET_VERSION_STAGE
will be ignored
Set up AWS Secrets Manager credentials
There are three ways to specify your AWS credentials. The credentials policy should allow performing the secretsmanager:GetSecretValue
and secretsmanager:ListSecretVersionIds
actions with the specified secret: