extensions.fs-store-aws-s3-persistence.bucket is not respected setting as environment variable using the Docker full version of jsReport
-
Regarding this page: https://jsreport.net/learn/configuration#environment-variables it is possible to set an environment variable to override the json property in the config.
I tried to override the environment via an environment variable but it was not respected an failing with this error:
Error occured during reporter init Error: The fs store is configured to use aws s3 persistence but the bucket is not set. Use store.persistence.bucket or extensions.fs-store-aws-s3-persistence.bucket to set the proper value.
During further tests, the environment variable was respected only when the not full version of jsReport was used e.g. https://hub.docker.com/layers/jsreport/jsreport/2.6.1/images/sha256-4dcd6427f4da5f8d03d86c5ac0459b80047369a388792b52272322dff540d418?context=explore
Has someone else also this issue and can help me?
-
Please replace
.
with_
in environment variable name. This works for me for exampledocker run -p 5488:5488 -e extensions_fs-store-aws-s3-persistence_bucket=foo -v C:\temp\app\jsreport.config.json:/app/jsreport.config.json jsreport/jsreport:2.11.0-full
-
Hi @jan_blaha ,
thanks for the fast answer.
I tried both in our Kubernetes environment passing the environment variables using
.
and_
as separators with jsReport 2.6.1 (non full version) and this is working.But with the full versions greater than 2.6.1 (full version) both separator versions, unfortunately, are not respected although they were passed and visible in Kubernetes.
-
I'm afraid kubernetes doesn't like dashes
-
in the env names.
Try thisextensions_fsStoreAwsS3Persistence_bucket
-
Hi @jan_blaha ,
to give you further feedback on this topic.
Your provided solution works now for the full and non full version of jsReport in Kubernetes. Thank you very much for this hint:
extensions_fsStoreAwsS3Persistence_bucket
Maybe it is only a Kubernetes issue but
extensions_fs-store-aws-s3-persistence_bucket
only works for the non full version of jsReport. The full jsReport versions are not respecting the environment variable.
Thank your for your hint