-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[IMP] Add some more default configurations #62
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,6 +34,17 @@ ONBUILD ARG PGUSER=odoo | |
ONBUILD ARG PGPASSWORD=odoopassword | ||
ONBUILD ARG PGHOST=db | ||
ONBUILD ARG PGDATABASE=prod | ||
ONBUILD ARG ODOO_MAX_CRON_THREADS=1 | ||
ONBUILD ARG ODOO_WORKERS=4 | ||
ONBUILD ARG ODOO_LIMIT_TIME_REAL=120 | ||
ONBUILD ARG ODOO_LIMIT_TIME_CPU=60 | ||
ONBUILD ARG ODOO_LIMIT_MEMORY_HARD=805306368 | ||
ONBUILD ARG ODOO_LIMIT_MEMORY_SOFT=671088640 | ||
ONBUILD ARG ODOO_LIMIT_REQUEST=8192 | ||
ONBUILD ARG ODOO_LIMIT_TIME_REAL_CRON=-1 | ||
ONBUILD ARG ODOO_DB_FILTER="" | ||
ONBUILD ARG ODOO_LIST_DB=1 | ||
ONBUILD ARG ODOO_LOG_LEVEL=info | ||
# Config variables | ||
ONBUILD ENV ADMIN_PASSWORD="$ADMIN_PASSWORD" \ | ||
UNACCENT="$UNACCENT" \ | ||
|
@@ -48,7 +59,19 @@ ONBUILD ENV ADMIN_PASSWORD="$ADMIN_PASSWORD" \ | |
SMTP_PASSWORD="$SMTP_PASSWORD" \ | ||
SMTP_SSL="$SMTP_SSL" \ | ||
EMAIL_FROM="$EMAIL_FROM" \ | ||
WITHOUT_DEMO="$WITHOUT_DEMO" | ||
WITHOUT_DEMO="$WITHOUT_DEMO" \ | ||
ODOO_MAX_CRON_THREADS="$ODOO_MAX_CRON_THREADS" \ | ||
ODOO_WORKERS="$ODOO_WORKERS" \ | ||
ODOO_LIMIT_TIME_REAL="$ODOO_LIMIT_TIME_REAL" \ | ||
ODOO_LIMIT_TIME_CPU="$ODOO_LIMIT_TIME_CPU" \ | ||
ODOO_LIMIT_MEMORY_HARD="$ODOO_LIMIT_MEMORY_HARD" \ | ||
ODOO_LIMIT_MEMORY_SOFT="$ODOO_LIMIT_MEMORY_SOFT" \ | ||
ODOO_LIMIT_REQUEST="$ODOO_LIMIT_REQUEST" \ | ||
ODOO_LIMIT_TIME_REAL_CRON="$ODOO_LIMIT_TIME_REAL_CRON" \ | ||
ODOO_DB_FILTER="$ODOO_DB_FILTER" \ | ||
ODOO_LIST_DB="$ODOO_LIST_DB" \ | ||
ODOO_LOG_LEVEL="$ODOO_LOG_LEVEL" | ||
>>>>>>> [IMP] Add some more default configurations | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oops.. wrong rebase |
||
ONBUILD ARG LOCAL_CUSTOM_DIR=./custom | ||
ONBUILD COPY $LOCAL_CUSTOM_DIR /opt/odoo/custom | ||
# https://docs.python.org/2.7/library/logging.html#levels | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
[options] | ||
; Configuration file template that will be expanded on build | ||
admin_passwd = $ADMIN_PASSWORD | ||
data_dir = /var/lib/odoo | ||
unaccent = $UNACCENT |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
max_cron_threads = $ODOO_MAX_CRON_THREADS | ||
workers = $ODOO_WORKERS | ||
limit_time_real = $ODOO_LIMIT_TIME_REAL | ||
limit_time_cpu = $ODOO_LIMIT_TIME_CPU | ||
limit_memory_hard = $ODOO_LIMIT_MEMORY_HARD | ||
limit_memory_soft = $ODOO_LIMIT_MEMORY_SOFT | ||
limit_request = $ODOO_LIMIT_REQUEST | ||
limit_time_real_cron = $ODOO_LIMIT_TIME_REAL_CRON |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
admin_passwd = $ADMIN_PASSWORD | ||
dbfilter = $ODOO_DB_FILTER | ||
list_db = $ODOO_LIST_DB |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
log_level = $ODOO_LOG_LEVEL |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -140,6 +140,9 @@ def test_settings(self): | |
("--stop-after-init",), | ||
# SMTP settings work | ||
("./custom/scripts/test_smtp_settings.py",), | ||
# Environment vars were converted to config | ||
("bash", "-c", | ||
"odoo --stop-after-init && custom/extras/goodconf.py"), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
) | ||
# Odoo 8.0 has no shell | ||
for sub_env in matrix(odoo_skip={"8.0"}): | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/usr/local/bin/python-odoo-shell | ||
from odoo.tools import config | ||
assert config.get("limit_request") == "8000" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still fails on line 3. I'm suspecting that duplicate keys cannot be correctly parsed, or that the parameter is converted to Maybe could you add assertion messages that help us to debug further? Example: assert config.get("limit_request") == 8000, "%r is not %r" % (config.get("limit_request"), 8000) ... and the same in line 4 |
||
assert not config.get("list_db") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You forgot to translate these
ARG
intoENV
, like in the v8 dockerfile. That's the cause of v11 failure.