diff --git a/NEWS.rst b/NEWS.rst index 31234ceee1633a90193553c341236311216aaede_TkVXUy5yc3Q=..bbc6dd83361e752629dcd67c7239b4f6cb49a0c3_TkVXUy5yc3Q= 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -7,6 +7,8 @@ When copying python packages to build the image, use hg archive rather than rsync. +docker_dev_start: Add option to activate S3 storage for attachments (requires the s3_attachment_storage module to be installed to work) + 20.3.1 ------ diff --git a/odoo_scripts/docker_dev_start.py b/odoo_scripts/docker_dev_start.py index 31234ceee1633a90193553c341236311216aaede_b2Rvb19zY3JpcHRzL2RvY2tlcl9kZXZfc3RhcnQucHk=..bbc6dd83361e752629dcd67c7239b4f6cb49a0c3_b2Rvb19zY3JpcHRzL2RvY2tlcl9kZXZfc3RhcnQucHk= 100755 --- a/odoo_scripts/docker_dev_start.py +++ b/odoo_scripts/docker_dev_start.py @@ -54,5 +54,5 @@ _logger = logging.getLogger(__name__) -__version__ = "3.12.0" +__version__ = "3.12.1" __date__ = "2017-08-11" @@ -58,5 +58,5 @@ __date__ = "2017-08-11" -__updated__ = "2023-04-26" +__updated__ = "2023-05-15" def __parser(project_name: str) -> ArgumentParser: @@ -413,6 +413,15 @@ type=int, ) + # workers options + parser.add_argument( + "--activate-s3-storage", + help="Activate S3 storage using the provided bucket as the main one [default: " + "%(default)s]", + default=None, + type=str, + ) + return parser @@ -481,6 +490,7 @@ # XXX should that variable be called multi_workers? longpolling = workers > 0 test_tags = nmspc.test_tags + activate_s3_storage = nmspc.activate_s3_storage if restore_filename: if not database: @@ -532,6 +542,13 @@ "ports": {}, "environment": {}, } + if activate_s3_storage: + options["environment"].update( + { + "s3AttachmentStorageActivate": "true", + "s3AttachmentStorageServerBucket": activate_s3_storage, + } + ) # if not longpolling: options["hostname"] = project_name # TODO detect that from configuration or force it