Skip to content
Snippets Groups Projects
Commit b42bb38c authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:sparkles: when using chown, also include /var/lib/odoo for odoo 10+

parent 00b990bf
No related branches found
No related tags found
1 merge request!55Improve chown
......@@ -7,6 +7,7 @@
Add option to include custom developer mode. Default is still to use reload and pdb. To use ipdb, use ``--dev-opt ipdb`` instead of ``--ipdb``.
docker_dev_start chown option also chown the content of ``/var/lib/odoo`` for recent Odoo.
9.0.1
-----
......
......@@ -565,6 +565,11 @@
# make sure the permission in the volumes are correct
if run_chown:
_logger.info("chown container’s /mnt to Odoo user")
chown_directories = ["/mnt"]
if odoo_type not in ("odoo7", "odoo8"):
chown_directories.append("/var/lib/odoo")
_logger.info(
"chown container’s %s to Odoo user", ", ".join(chown_directories)
)
client.containers.run(
image,
......@@ -569,6 +574,6 @@
client.containers.run(
image,
command=["odoo", "--recursive", "/mnt"],
command=["odoo", "--recursive"] + chown_directories,
remove=True,
entrypoint="/bin/chown",
mounts=mounts,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment