First, setting the environment variables in the .env file for MAYAN_DOCUMENTS_STORAGE_BACKEND and MAYAN_DOCUMENTS_STORAGE_BACKEND ARGUMENTS does not seem to result in any changes when starting docker, even from a clean install.
Second, I am unclear if the Object Storage is designed to be used directly with S3 or requires a 3rd party service. Can I use the S3 URL for the endpoint to interact directly with S3? If not, what are my other alternatives?
Second, I am unclear if the Object Storage is designed to be used directly with S3 or requires a 3rd party service. Can I use the S3 URL for the endpoint to interact directly with S3? If not, what are my other alternatives?
Mayan itself does not handle storage. This falls on the storage driver used.
The typically used storage driver from the Django Storage project supports Amazon’s original S3 implementation and compatible storages. There are variations in the settings depending on the S3 implementation. For example Amazon S3 does not required the endpoint_url attribute while it does require the zone attributes.
To be clear, the values in the .env for configuring the storage parameters are the ones not working:
#########################################################
# These variables are passed to the running containers. #
# They are interpreted by Mayan EDMS. #
#########################################################
# To use block storage.
# MAYAN_DOCUMENTS_STORAGE_BACKEND="storages.backends.s3boto3.S3Boto3Storage"
# MAYAN_DOCUMENTS_STORAGE_BACKEND_ARGUMENTS="{'access_key':'<access key>','secret_key':'<secret key>','bucket_name':'mayan','endpoint_url':'http://<URL:port>','verify':'False'}" # 'verify':'False' for local servers with self signed SSL certificate
I was able to modify the config.yml file on the container and get the S3 connection working with the S3Boto3Storage option. The enpoint URL just needed to be set to the S3 bucket URL. The other Django Storage project S3 option is not resident on the container.
I also discovered a bug whenever S3 is used when downloading and have posted on a separate thread.