Help

欢迎!

该社区面向专业人士和我们产品和服务的爱好者。
分享和讨论最好的内容和新的营销理念,建立您的专业形象,一起成为更好的营销人员。


0

How to work with docker-image?

Avatar
odoo
Avatar
Discard
2 Answers
0
Avatar
odoo
Best Answer

hello,


Yes you can run Odoo in a docker container. When developing in docker I use bind mounts and typically use docker-compose  

Please do not take this the wrong way - I’ve been exactly where you‘re at right now with these questions. I would highly recommend you get a general sense of docker and Linux overall if you want to develop. 


Developing in Odoo, or any application, requires a tremendous amount of patience when learning. I will give you a direct answer but I highly recommend you learn how to use vscode or pycharm, the docker process and syncing of data. 


Here you go:

1) When using docker, I suggest using docker-compose for odoo and your database 

2) Use bind mounts so it’s easy to modify your code

3) When starting docker-compose, use

command: odoo -u your_module_name -d your_database_name

So it’s easy to type docker restart odoo


4) when syncing data, pycharm has a built in remote interpreter so you can keep a copy of the files on Windows and a copy on Ubuntu. When editing files in Windows 10, it will change the files on your server at the same time


5) If you do not want to sync that way, you can use NFS to sync but that can come with its own little issues



I really do suggest you get a firm understanding of the basic docker processes, SSH and how to edit/sync files before going further down this road. 


I wish you the best of luck

1 Comment
Avatar
Discard
Avatar
odoo
-

Great add with:
command: odoo -u your_module_name -d your_database_name

Can you show a snippet on which file you put this in so that it runs with docker restart odoo?

0
Avatar
odoo
Best Answer

thanks for your reply

1 Comment
Avatar
Discard
Avatar
odoo
-

please comment your comments as comment (