sample of debug

This commit is contained in:
Yhael S
2023-04-20 19:48:58 -05:00
parent f762585ba1
commit 406a6ceb1f
4 changed files with 15 additions and 0 deletions

View File

@@ -12,6 +12,7 @@ services:
- ./odoo/custom-addons:${CUSTOM_ADDONS}
- ./odoo/entrypoint.sh:/entrypoint.sh
- ./odoo/odoorc.sh:/odoorc.sh
command: /usr/bin/python3 -m debugpy --listen ${HTTP_INTERFACE}:8888 /usr/bin/odoo --config ${ODOO_RC}
env_file:
- ./.env
networks:

View File

@@ -53,6 +53,12 @@ RUN git clone ${ENTERPRISE_REPO} ${ROOT_PATH}/enterprise --depth 1 --branch ${OD
#-----------------------#
# PIP Dependencies #
#-----------------------#
# Copy PIP requirements
COPY ./odoo/requirements.txt /tmp/requirements.txt
# Install PIP requirements
RUN python3 -m pip install -r /tmp/requirements.txt
# RUN pip3 install debugpy
#-----------------------#
# Odoo Conf #

View File

@@ -30,6 +30,13 @@ case "$1" in
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --update=${UPDATE} --init=${INIT} --load=${SERVER_WIDE_MODULES} --dev=${DEV_MODE}
fi
if [ ${APP_ENV} = 'debug' ] ; then
# Automagically update the addons you are currently working on.
echo /usr/bin/python3 -m debugpy --listen 0.0.0.0:8071 /usr/bin/odoo --config ${ODOO_RC} --database= --update= --init= --load= --dev=
exec /usr/bin/python3 -m debugpy --listen 0.0.0.0:8071 /usr/bin/odoo --config ${ODOO_RC} --database=${DB_NAME} --update=${UPDATE} --init=${INIT} --load=${SERVER_WIDE_MODULES} --dev=${DEV_MODE}
fi
if [ ${APP_ENV} = 'testing' ] ; then
# Work in progres... (DO NOT USE)
echo odoo --config ${ODOO_RC} --database=test_${DB_NAME} --db-filter=test_${DB_NAME} --test-enable --test-commit --log-handler=:DEBUG --log-level=debug --workers=0 --init= --update=

1
odoo/requirements.txt Normal file
View File

@@ -0,0 +1 @@
debugpy