Add read-only mode that fallbacks on the database

This commit is contained in:
Guewen Baconnier
2016-10-24 17:12:27 +02:00
parent 7825661a1a
commit ec59d275e2
2 changed files with 105 additions and 22 deletions
+16 -1
View File
@@ -12,7 +12,7 @@ With system parameters:
* Create or set the system parameter with the key ``ir_attachment.location``
and the value in the form ``s3://<access-key>:<secret-key>@<bucket-name>``
* If the host is not AWS services, you can set the key
``ir_attachment.location.s3host`` to the hostname of the Object Storage
``ir_attachment.s3.host`` to the hostname of the Object Storage
service
With environment variables:
@@ -24,6 +24,21 @@ With environment variables:
* ``AWS_SECRET_ACCESS_KEY``
* ``AWS_BUCKETNAME``
Read-only mode:
You can configure the storage to be only for reads on the Object Storage.
This is convenient for replications/tests instances, that will be able to
access to the same content than the production database without any risk to
alter it. The files created or modified the read-only mode is active are
created in the database.
To activate the read-only mode, 2 possibilities:
* create the system parameter ``ir_attachment.s3.readonly`` and set a positive
value (1, true)
* set the environment variable ``AWS_ATTACHMENT_READONLY`` to a positive
value (1, true)
Limitations
-----------