{ "info": { "author": "Camptocamp,Odoo Community Association (OCA)", "author_email": "support@odoo-community.org", "bugtrack_url": null, "classifiers": [ "Framework :: Odoo", "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)", "Programming Language :: Python" ], "description": "======================================\nserver configuration environment files\n======================================\n\n.. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n !! This file is generated by oca-gen-addon-readme !!\n !! changes will be overwritten. !!\n !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!\n\n.. |badge1| image:: https://img.shields.io/badge/maturity-Beta-yellow.png\n :target: https://odoo-community.org/page/development-status\n :alt: Beta\n.. |badge2| image:: https://img.shields.io/badge/github-OCA%2Fserver--env-lightgray.png?logo=github\n :target: https://github.com/OCA/server-env/tree/13.0/server_environment\n :alt: OCA/server-env\n.. |badge3| image:: https://img.shields.io/badge/weblate-Translate%20me-F47D42.png\n :target: https://translation.odoo-community.org/projects/server-env-13-0/server-env-13-0-server_environment\n :alt: Translate me on Weblate\n.. |badge4| image:: https://img.shields.io/badge/runbot-Try%20me-875A7B.png\n :target: https://runbot.odoo-community.org/runbot/254/13.0\n :alt: Try me on Runbot\n\n|badge1| |badge2| |badge3| |badge4| \n\nThis module provides a way to define an environment in the main Odoo\nconfiguration file and to read some configurations from files\ndepending on the configured environment: you define the environment in\nthe main configuration file, and the values for the various possible\nenvironments are stored in the ``server_environment_files`` companion\nmodule.\n\nThe ``server_environment_files`` module is optional, the values can be set using\nan environment variable with a fallback on default values in the database.\n\nThe configuration read from the files are visible under the Configuration\nmenu. If you are not in the 'dev' environment you will not be able to\nsee the values contained in the defined secret keys\n(by default : '*passw*', '*key*', '*secret*' and '*token*').\n\n**Table of contents**\n\n.. contents::\n :local:\n\nInstallation\n============\n\nBy itself, this module does little. See for instance the\n``mail_environment`` addon which depends on this one to allow configuring\nthe incoming and outgoing mail servers depending on the environment.\n\nYou can store your configuration values in a companion module called\n``server_environment_files``. You can copy and customize the provided\n``server_environment_files_sample`` module for this purpose. Alternatively, you\ncan provide them in environment variables ``SERVER_ENV_CONFIG`` and\n``SERVER_ENV_CONFIG_SECRET``.\n\nConfiguration\n=============\n\nTo configure this module, you need to edit the main configuration file\nof your instance, and add a directive called ``running_env``. Commonly\nused values are 'dev', 'test', 'production'::\n\n [options]\n running_env=dev\n\nValues associated to keys containing 'passw' are only displayed in the 'dev'\nenvironment.\n\nYou have several possibilities to set configuration values:\n\nserver_environment_files\n~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can edit the settings you need in the ``server_environment_files`` addon. The\n``server_environment_files_sample`` can be used as an example:\n\n* values common to all / most environments can be stored in the\n ``default/`` directory using the .ini file syntax;\n* each environment you need to define is stored in its own directory\n and can override or extend default values;\n* you can override or extend values in the main configuration\n file of your instance;\n\nEnvironment variable\n~~~~~~~~~~~~~~~~~~~~\n\nYou can define configuration in the environment variable ``SERVER_ENV_CONFIG``\nand/or ``SERVER_ENV_CONFIG_SECRET``. The 2 variables are handled the exact same\nway, this is only a convenience for the deployment where you can isolate the\nsecrets in a different, encrypted, file. They are multi-line environment variables\nin the same configparser format than the files.\nIf you used options in ``server_environment_files``, the options set in the\nenvironment variable override them.\n\nThe options in the environment variable are not dependent of ``running_env``,\nthe content of the variable must be set accordingly to the running environment.\n\nExample of setup:\n\nA public file, containing that will contain public variables::\n\n # These variables are not odoo standard variables,\n # they are there to represent what your file could look like\n export WORKERS='8'\n export MAX_CRON_THREADS='1'\n export LOG_LEVEL=info\n export LOG_HANDLER=\":INFO\"\n export DB_MAXCONN=5\n\n # server environment options\n export SERVER_ENV_CONFIG=\"\n [storage_backend.my-sftp]\n sftp_server=10.10.10.10\n sftp_login=foo\n sftp_port=22200\n directory_path=Odoo\n \"\n\nA second file which is encrypted and contains secrets::\n\n # This variable is not an odoo standard variable,\n # it is there to represent what your file could look like\n export DB_PASSWORD='xxxxxxxxx'\n # server environment options\n export SERVER_ENV_CONFIG_SECRET=\"\n [storage_backend.my-sftp]\n sftp_password=xxxxxxxxx\n \"\n\nDefault values\n~~~~~~~~~~~~~~\n\nWhen using the ``server.env.mixin`` mixin, for each env-computed field, a\ncompanion field ``_env_default`` is created. This field is not\nenvironment-dependent. It's a fallback value used when no key is set in\nconfiguration files / environment variable.\n\nWhen the default field is used, the field is made editable on Odoo.\n\nNote: empty environment keys always take precedence over default fields\n\n\nKeychain integration\n~~~~~~~~~~~~~~~~~~~~\n\nRead the documentation of the class `models/server_env_mixin.py\n`_.\n\nUsage\n=====\n\nYou can include a mixin in your model and configure the env-computed fields\nby an override of ``_server_env_fields``.\n\n::\n\n class StorageBackend(models.Model):\n _name = \"storage.backend\"\n _inherit = [\"storage.backend\", \"server.env.mixin\"]\n\n @property\n def _server_env_fields(self):\n return {\"directory_path\": {}}\n\nRead the documentation of the class and methods in `models/server_env_mixin.py\n`__.\n\nKnown issues / Roadmap\n======================\n\n* it is not possible to set the environment from the command line. A\n configuration file must be used.\n* the module does not allow to set low level attributes such as database server, etc.\n\nBug Tracker\n===========\n\nBugs are tracked on `GitHub Issues `_.\nIn case of trouble, please check there if your issue has already been reported.\nIf you spotted it first, help us smashing it by providing a detailed and welcomed\n`feedback `_.\n\nDo not contact contributors directly about support or help with technical issues.\n\nCredits\n=======\n\nAuthors\n~~~~~~~\n\n* Camptocamp\n\nContributors\n~~~~~~~~~~~~\n\n* Florent Xicluna (Wingo) \n* Nicolas Bessi \n* Alexandre Fayolle \n* Daniel Reis \n* Holger Brunn \n* Leonardo Pistone \n* Adrien Peiffer \n* Thierry Ducrest \n* Guewen Baconnier \n* Thomas Binfeld \n* St\u00e9phane Bidoul \n\nMaintainers\n~~~~~~~~~~~\n\nThis module is maintained by the OCA.\n\n.. image:: https://odoo-community.org/logo.png\n :alt: Odoo Community Association\n :target: https://odoo-community.org\n\nOCA, or the Odoo Community Association, is a nonprofit organization whose\nmission is to support the collaborative development of Odoo features and\npromote its widespread use.\n\nThis module is part of the `OCA/server-env `_ project on GitHub.\n\nYou are welcome to contribute. To learn how please visit https://odoo-community.org/page/Contribute.\n\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/OCA/server-env", "keywords": "", "license": "GPL-3 or any later version", "maintainer": "", "maintainer_email": "", "name": "odoo13-addon-server-environment", "package_url": "https://pypi.org/project/odoo13-addon-server-environment/", "platform": "", "project_url": "https://pypi.org/project/odoo13-addon-server-environment/", "project_urls": { "Homepage": "http://github.com/OCA/server-env" }, "release_url": "https://pypi.org/project/odoo13-addon-server-environment/13.0.2.0.1.dev3/", "requires_dist": [ "odoo (<13.1dev,>=13.0a)" ], "requires_python": ">=3.5", "summary": "move some configurations out of the database", "version": "13.0.2.0.1.dev3" }, "last_serial": 5966272, "releases": { "13.0.2.0.1.dev3": [ { "comment_text": "", "digests": { "md5": "01a407b7a29a826ace11aafe39d19af7", "sha256": "589827491d4a7a45be0d1e3e3b7cb562249ad730fc1619902e0e4477edc9cd39" }, "downloads": -1, "filename": "odoo13_addon_server_environment-13.0.2.0.1.dev3-py3-none-any.whl", "has_sig": false, "md5_digest": "01a407b7a29a826ace11aafe39d19af7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 185995, "upload_time": "2019-10-13T04:30:30", "url": "https://files.pythonhosted.org/packages/12/0b/2c57c721ed3701aa5f87cd7b0b88c644d705a2cb5ffd88a59092ada173f5/odoo13_addon_server_environment-13.0.2.0.1.dev3-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "01a407b7a29a826ace11aafe39d19af7", "sha256": "589827491d4a7a45be0d1e3e3b7cb562249ad730fc1619902e0e4477edc9cd39" }, "downloads": -1, "filename": "odoo13_addon_server_environment-13.0.2.0.1.dev3-py3-none-any.whl", "has_sig": false, "md5_digest": "01a407b7a29a826ace11aafe39d19af7", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.5", "size": 185995, "upload_time": "2019-10-13T04:30:30", "url": "https://files.pythonhosted.org/packages/12/0b/2c57c721ed3701aa5f87cd7b0b88c644d705a2cb5ffd88a59092ada173f5/odoo13_addon_server_environment-13.0.2.0.1.dev3-py3-none-any.whl" } ] }