Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions 11.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ENV DB_FILTER=.* \
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 12.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ ENV DB_FILTER=.* \
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 13.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
ARG MQT=https://github.com/OCA/maintainer-quality-tools.git
ARG WKHTMLTOPDF_VERSION=0.12.5
ARG WKHTMLTOPDF_CHECKSUM='dfab5506104447eef2530d1adb9840ee3a67f30caaad5e9bcb8743ef2f9421bd'
ENV DB_FILTER=.* \

Check warning on line 9 in 13.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (13.0, linux/amd64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 9 in 13.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (13.0, linux/amd64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
DEPTH_DEFAULT=1 \
DEPTH_MERGE=100 \
EMAIL=https://hub.docker.com/r/tecnativa/odoo \
Expand All @@ -26,6 +26,9 @@
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 14.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
ARG WKHTMLTOPDF_VERSION=0.12.5
ARG WKHTMLTOPDF_AMD64_CHECKSUM='dfab5506104447eef2530d1adb9840ee3a67f30caaad5e9bcb8743ef2f9421bd'
ARG WKHTMLTOPDF_ARM64_CHECKSUM="3344e3a72f4cb4c1218cf48ac5fa9e88bef62aa7fa6f2295be7d5bc1fef100b1"
ENV DB_FILTER=.* \

Check warning on line 10 in 14.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (14.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 10 in 14.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (14.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
DEPTH_DEFAULT=1 \
DEPTH_MERGE=100 \
EMAIL=https://hub.docker.com/r/tecnativa/odoo \
Expand All @@ -25,6 +25,9 @@
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 15.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ ENV DB_FILTER=.* \
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 16.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
ARG FIRST_UID=500
ARG FIRST_GID=500

ENV DB_FILTER=.* \

Check warning on line 16 in 16.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (16.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 16 in 16.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (16.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
DEPTH_DEFAULT=1 \
DEPTH_MERGE=100 \
EMAIL=https://hub.docker.com/r/tecnativa/odoo \
Expand All @@ -31,6 +31,9 @@
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 17.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ARG LAST_SYSTEM_GID=499
ARG FIRST_UID=500
ARG FIRST_GID=500
ENV DB_FILTER=.* \

Check warning on line 15 in 17.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (17.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 15 in 17.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (17.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
DEPTH_DEFAULT=1 \
DEPTH_MERGE=100 \
EMAIL=https://hub.docker.com/r/tecnativa/odoo \
Expand All @@ -30,6 +30,9 @@
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
3 changes: 3 additions & 0 deletions 18.0.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
ARG LAST_SYSTEM_GID=499
ARG FIRST_UID=500
ARG FIRST_GID=500
ENV DB_FILTER=.* \

Check warning on line 15 in 18.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (18.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/

Check warning on line 15 in 18.0.Dockerfile

View workflow job for this annotation

GitHub Actions / build-push-pr (18.0, linux/amd64,linux/arm64)

Sensitive data should not be used in the ARG or ENV commands

SecretsUsedInArgOrEnv: Do not use ARG or ENV instructions for sensitive data (ENV "GEOIP_LICENSE_KEY") More info: https://docs.docker.com/go/dockerfile/rule/secrets-used-in-arg-or-env/
DEPTH_DEFAULT=1 \
DEPTH_MERGE=100 \
EMAIL=https://hub.docker.com/r/tecnativa/odoo \
Expand All @@ -30,6 +30,9 @@
DEBUGPY_ENABLE=0 \
PUDB_RDB_HOST=0.0.0.0 \
PUDB_RDB_PORT=6899 \
PYDEVD_PORT=6988 \
PYDEVD_ENABLE=0 \
PYCHARM_ENABLE=0 \
PYTHONOPTIMIZE="" \
UNACCENT=true \
WAIT_DB=true \
Expand Down
2 changes: 2 additions & 0 deletions bin/direxec
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ if extra_command:
+ os.environ["DEBUGPY_ARGS"].split()
+ extra_command
)
elif os.environ["PYDEVD_ENABLE"] == "1" or os.environ["PYCHARM_ENABLE"] == "1":
extra_command[0] = "/usr/local/bin/odoo_pydevd"
logger.log(
DEBUG if extra_command[0] == "/qa/insider" else INFO,
"Executing %s",
Expand Down
27 changes: 27 additions & 0 deletions bin/odoo_pydevd
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/usr/bin/env python3

# set server timezone in UTC before time module imported
import os
os.environ["TZ"] = "UTC"

# import regular pydevd or pycharm's version depending on flags
if os.environ["PYCHARM_ENABLE"] == "1":
import pydevd_pycharm as pydevd
else:
import pydevd
import odoo

# If we don't get host, we guess it from within the container
if os.environ.get("PYDEVD_HOST", False):
pydevd_host = os.environ["PYDEVD_HOST"]
else:
import socket
local_ip = socket.gethostbyname(socket.gethostname())
pydevd_host = ".".join(local_ip.split(".")[0:3] + ["1"])
# Port needs casting to int if obtained from env variable
port=int(os.environ.get("PYDEVD_PORT", 6988))
pydevd.settrace(
pydevd_host, port=port, suspend=False, stdoutToServer=True, stderrToServer=True
)
if __name__ == "__main__":
odoo.cli.main()
Loading