Hello Farid
please note that when using debugpy to debug python apps (Odoo server in our case). you're overriding the entrypoint.sh of the container. by other words you are starting the debugpy server inside of the container instead of Odoo server.
take a look at the following command:
/usr/bin/python3 -m debugpy: here you ask python to start module debugpy --listen 0.0.0.0:8888: here you aske debugpy server to listen 0.0.0.0:8888 /usr/bin/odoo: here you ask debugpy to start a python process (in our case odoo server) --db_user=odoo --db_host=db --db_password=odoo: here, are the rest of odoo cli
so if you are debugging a different python file named tic_tac_toe.py, the command would be something like
python -m debugpy tic_tac_toe.py
the first portion of the docker-compose command:
docker-compose run --rm-p 8888:8888 -p 8869:8069 {DOCKER IMAGE[:TAG|@DIGEST]}
it is asking docker-compose to map ports of the host to ports of the container & running the image. please note that you have to replace {DOCKER IMAGE[:TAG|@DIGEST]} with image information. you can get such information from command docker images -a
~ → docker images -a
REPOSITORY TAG IMAGE ID CREATED SIZE
odoo 14 27c34e85682c 2 weeks ago 1.24GB
odoo 14.0 27c34e85682c 2 weeks ago 1.24GB
postgres 13 a6cd86e1dfce 3 weeks ago 314MB
so in my case it could be
docker-compose run --rm odoo:13
# or
docker-compose run --rm a6cd86e1dfce
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello Farid
please note that when using debugpy to debug python apps (Odoo server in our case). you're overriding the entrypoint.sh of the container. by other words you are starting the debugpy server inside of the container instead of Odoo server.
take a look at the following command:
/usr/bin/python3 -m debugpy
: here you ask python to start module debugpy--listen 0.0.0.0:8888
: here you aske debugpy server to listen 0.0.0.0:8888/usr/bin/odoo
: here you ask debugpy to start a python process (in our case odoo server)--db_user=odoo --db_host=db --db_password=odoo
: here, are the rest of odoo cliso if you are debugging a different python file named tic_tac_toe.py, the command would be something like
the first portion of the docker-compose command:
it is asking docker-compose to map ports of the host to ports of the container & running the image. please note that you have to replace
{DOCKER IMAGE[:TAG|@DIGEST]}
with image information. you can get such information from commanddocker images -a
so in my case it could be