mirror of
https://github.com/odoocker/odoocker
synced 2025-11-04 15:19:22 +01:00
framework upgrade
This commit is contained in:
122
odoo/Dockerfile
122
odoo/Dockerfile
@@ -1,74 +1,90 @@
|
||||
ARG ODOO_VERSION=16.0
|
||||
|
||||
#------------------------#
|
||||
# Odoo Community #
|
||||
#------------------------#
|
||||
ARG ODOO_VERSION
|
||||
FROM odoo:${ODOO_VERSION}
|
||||
|
||||
# Switch back to root user
|
||||
# Switch to root user
|
||||
USER root
|
||||
|
||||
# Update & Upgrade
|
||||
RUN apt-get update && apt-get upgrade -y
|
||||
# Receive ARGs from docker-compose.yml & convert them into ENVs
|
||||
ARG ROOT_PATH
|
||||
ARG LOG_PATH
|
||||
ARG GITHUB_USER
|
||||
ARG GITHUB_ACCESS_TOKEN
|
||||
ARG ENTERPRISE_REPO
|
||||
ARG ENTERPRISE_ADDONS
|
||||
ARG ODOO_RC
|
||||
|
||||
# Upgrade pip
|
||||
RUN pip3 install --upgrade pip
|
||||
|
||||
# Set Odoo root path
|
||||
ARG ROOT_PATH=/usr/lib/python3/dist-packages/odoo
|
||||
|
||||
#---------------#
|
||||
# Logging #
|
||||
#---------------#
|
||||
# Set Log variables
|
||||
ARG LOGPATH=/var/log/odoo
|
||||
ARG LOGFILE=${LOGPATH}/odoo.log
|
||||
|
||||
# Create odoo.log file and give permissions.
|
||||
RUN touch ${LOGFILE} && chown odoo:odoo -R ${LOGPATH}
|
||||
|
||||
#-----------------------#
|
||||
# Odoo Enterprise #
|
||||
#-----------------------#
|
||||
# Install git
|
||||
RUN apt-get install git -y
|
||||
|
||||
# Set Github Credentials
|
||||
ARG GITHUB_USER=yhaelopez
|
||||
ARG GITHUB_ACCESS_TOKEN=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
|
||||
ARG ENTERPRISE_REPO=https://${GITHUB_USER}:${GITHUB_ACCESS_TOKEN}@github.com/odoo/enterprise.git
|
||||
ARG ENTERPRISE_PATH=${ROOT_PATH}/enterprise
|
||||
|
||||
# Create Enterprise Path & give permissions
|
||||
RUN mkdir -p ${ENTERPRISE_PATH} && chown odoo:odoo -R ${ENTERPRISE_PATH}
|
||||
|
||||
# Clone Enterprise Repository
|
||||
RUN git clone ${ENTERPRISE_REPO} ${ROOT_PATH}/enterprise --depth 1 --branch ${ODOO_VERSION} --single-branch --no-tags
|
||||
|
||||
#--------------------------------#
|
||||
# Fix Deprecation Warnings #
|
||||
#--------------------------------#
|
||||
ENV ODOO_VERSION=${ODOO_VERSION} \
|
||||
LOG_PATH=${LOG_PATH} \
|
||||
GITHUB_USER=${GITHUB_USER} \
|
||||
GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} \
|
||||
ENTERPRISE_REPO=${ENTERPRISE_REPO} \
|
||||
ENTERPRISE_ADDONS=${ENTERPRISE_ADDONS} \
|
||||
ODOO_RC=${ODOO_RC}
|
||||
|
||||
#------------------------#
|
||||
# APT Dependencies #
|
||||
#------------------------#
|
||||
RUN apt-get update && apt-get install -y \
|
||||
apt-utils \
|
||||
git \
|
||||
git-man \
|
||||
less \
|
||||
libcbor0 \
|
||||
libcurl3-gnutls \
|
||||
libedit2 \
|
||||
liberror-perl \
|
||||
libxmuu1 \
|
||||
openssh-client \
|
||||
patch \
|
||||
xauth \
|
||||
# Clean up the apt cache to reduce the image size
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
#-----------------------#
|
||||
# PIP Dependencies #
|
||||
# Odoo Enterprise #
|
||||
#-----------------------#
|
||||
# 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
|
||||
# Create Enterprise addons directory
|
||||
RUN mkdir -p ${ENTERPRISE_ADDONS} && \
|
||||
chown odoo:odoo -R ${ENTERPRISE_ADDONS}
|
||||
|
||||
# Clone Enterprise addons if user and token are present
|
||||
RUN if [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then \
|
||||
git clone ${ENTERPRISE_REPO} ${ENTERPRISE_ADDONS} --depth 1 --branch ${ODOO_VERSION} --single-branch --no-tags; \
|
||||
fi
|
||||
|
||||
#---------------------#
|
||||
# PIP Dependecies #
|
||||
#---------------------#
|
||||
# Upgrade pip
|
||||
RUN pip3 install --upgrade pip
|
||||
|
||||
# Copy & Install PIP requirements
|
||||
COPY --chown=odoo:odoo ./odoo/requirements.txt /tmp/requirements.txt
|
||||
|
||||
RUN python3 -m pip install --upgrade -r /tmp/requirements.txt && \
|
||||
rm /tmp/requirements.txt
|
||||
|
||||
#---------------------#
|
||||
# Logging #
|
||||
#---------------------#
|
||||
|
||||
# Create odoo.log file
|
||||
RUN touch ${LOG_PATH} && chown odoo:odoo ${LOG_PATH}
|
||||
|
||||
#-----------------------#
|
||||
# Odoo Conf #
|
||||
#-----------------------#
|
||||
# Copy environment variables at /
|
||||
COPY ./.env /
|
||||
# Copy script to generate odoo.conf
|
||||
COPY ./odoo/odoorc.sh /
|
||||
|
||||
# Copy environment variables & script to generate odoo.conf
|
||||
COPY --chown=odoo:odoo ./.env /
|
||||
COPY --chown=odoo:odoo ./odoo/odoorc.sh /
|
||||
|
||||
# Generate odoo.conf
|
||||
RUN /odoorc.sh && chown odoo:odoo ${ODOO_RC}
|
||||
|
||||
# Switch back to odoo user
|
||||
USER odoo
|
||||
USER odoo
|
||||
|
||||
2
odoo/custom-addons/.gitignore
vendored
2
odoo/custom-addons/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
# Ignores any __pycache__ folder.
|
||||
__pycache__
|
||||
@@ -12,50 +12,50 @@ case "$1" in
|
||||
wait-for-psql.py --db_host ${DB_HOST} --db_port ${DB_PORT} --db_user ${DB_USER} --db_password ${DB_PASSWORD} --timeout=30
|
||||
|
||||
if [ ${APP_ENV} = 'fresh' ] || [ ${APP_ENV} = 'restore' ]; then
|
||||
echo odoo --config ${ODOO_RC} --database= --update= --init= --load=${SERVER_WIDE_MODULES} --workers=0 --log-handler=:INFO --log-level=info --max-cron-threads=2 --limit-time-cpu=3600 --limit-time-real=7200 --limit-time-real-cron=600 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --load-language= --without-demo=True --import-partial=False --log-db= --dev=False
|
||||
echo odoo --config ${ODOO_RC} --database= --init= --update= --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
||||
|
||||
exec odoo --config ${ODOO_RC} --database= --update= --init= --load=${SERVER_WIDE_MODULES} --workers=0 --log-handler=:INFO --log-level=info --max-cron-threads=2 --limit-time-cpu=3600 --limit-time-real=7200 --limit-time-real-cron=600 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --load-language= --without-demo=True --import-partial=False --log-db= --dev=False
|
||||
exec odoo --config ${ODOO_RC} --database= --init= --update= --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
||||
fi
|
||||
|
||||
if [ ${APP_ENV} = 'full' ] ; then
|
||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INSTALLED_MODULES} --update= --load=${SERVER_WIDE_MODULES} --workers=0 --log-handler=:INFO --log-level=info --max-cron-threads=2 --limit-time-cpu=3600 --limit-time-real=7200 --limit-time-real-cron=600 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --db-filter= --load-language=${LOAD_LANGUAGE} --without-demo=True --import-partial=False --log-db= --dev=False
|
||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INSTALLED_MODULES} --update= --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --max-cron-threads=${MAX_CRON_THREADS} --limit-time-cpu=3600 --limit-time-real=7200 --workers=0 --without-demo=all
|
||||
|
||||
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INSTALLED_MODULES} --update= --load=${SERVER_WIDE_MODULES} --workers=0 --log-handler=:INFO --log-level=info --max-cron-threads=2 --limit-time-cpu=3600 --limit-time-real=7200 --limit-time-real-cron=600 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --db-filter= --load-language=${LOAD_LANGUAGE} --without-demo=True --import-partial=False --log-db= --dev=False
|
||||
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INSTALLED_MODULES} --update= --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --max-cron-threads=${MAX_CRON_THREADS} --limit-time-cpu=3600 --limit-time-real=7200 --workers=0 --without-demo=all
|
||||
fi
|
||||
|
||||
if [ ${APP_ENV} = 'local' ] ; then
|
||||
# Automagically update the addons you are currently working on.
|
||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --update=${UPDATE} --init=${INIT} --load=${SERVER_WIDE_MODULES} --dev=${DEV_MODE}
|
||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=${UPDATE} --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --workers=${WORKERS} --dev=${DEV_MODE}
|
||||
|
||||
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --update=${UPDATE} --init=${INIT} --load=${SERVER_WIDE_MODULES} --dev=${DEV_MODE}
|
||||
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=${UPDATE} --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --workers=${WORKERS} --dev=${DEV_MODE}
|
||||
fi
|
||||
|
||||
if [ ${APP_ENV} = 'debug' ] ; then
|
||||
# Automagically update the addons you are currently working on.
|
||||
exec /usr/bin/python3 -m debugpy --listen 0.0.0.0:8888 /usr/bin/odoo --config ${ODOO_RC} --database=${DB_NAME} --update=${UPDATE} --init=${INIT} --load=${SERVER_WIDE_MODULES} --dev=${DEV_MODE}
|
||||
echo /usr/bin/python3 -m debugpy --listen ${DEBUG_INTERFACE}:${DEBUG_PORT} ${DEBUG_PATH} --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=${UPDATE} --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --workers=${WORKERS} --dev=${DEV_MODE}
|
||||
|
||||
exec /usr/bin/python3 -m debugpy --listen 0.0.0.0:8888 /usr/bin/odoo --config ${ODOO_RC} --database=${DB_NAME} --update=${UPDATE} --init=${INIT} --load=${SERVER_WIDE_MODULES} --dev=${DEV_MODE}
|
||||
exec /usr/bin/python3 -m debugpy --listen ${DEBUG_INTERFACE}:${DEBUG_PORT} ${DEBUG_PATH} --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=${UPDATE} --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --workers=${WORKERS} --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=
|
||||
# Runs the tests in a 'test_*' database for the addons you are currently working on via test tags.
|
||||
echo odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --without-demo= --workers=0 --stop-after-init
|
||||
|
||||
exec 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=
|
||||
exec odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --without-demo= --workers=0 --stop-after-init
|
||||
fi
|
||||
|
||||
if [ ${APP_ENV} = 'staging' ] ; then
|
||||
# Automagically install/upgrade all addons
|
||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${SERVER_WIDE_MODULES} --workers=0 --log-handler=:INFO --log-level=info --max-cron-threads=2 --limit-time-cpu=3600 --limit-time-real=7200 --limit-time-real-cron=600 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --db-filter= --load-language=${LOAD_LANGUAGE} --without-demo=True --import-partial=False --log-db= --dev=False
|
||||
# Automagically upgrade all addons and install new ones.
|
||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --limit-time-cpu=3600 --limit-time-real=7200 --workers=0 --without-demo=all
|
||||
|
||||
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${SERVER_WIDE_MODULES} --workers=0 --log-handler=:INFO --log-level=info --max-cron-threads=2 --limit-time-cpu=3600 --limit-time-real=7200 --limit-time-real-cron=600 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --db-filter= --load-language=${LOAD_LANGUAGE} --without-demo=True --import-partial=False --log-db= --dev=False
|
||||
exec odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${SERVER_WIDE_MODULES} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --limit-time-cpu=3600 --limit-time-real=7200 --workers=0 --without-demo=all
|
||||
fi
|
||||
|
||||
if [ ${APP_ENV} = 'production' ] ; then
|
||||
# Bring up Odoo without any addons to install/update.
|
||||
echo odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --db-filter= --dev=False --import-partial=False --without-demo=True --log-handler=:INFO --log-level=info --log-db= --log-db-level=warning --workers=2 --max-cron-threads=2 --log-level=info --log-handler=:INFO --limit-time-cpu=120 --limit-time-real=240 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --import-partial=False
|
||||
# Bring up Odoo ready for production.
|
||||
echo odoo --config ${ODOO_RC} --database= --init= --update= --load=${SERVER_WIDE_MODULES} --workers=${WORKERS} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language= --without-demo=all --dev=False
|
||||
|
||||
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --db-filter= --dev=False --import-partial=False --without-demo=True --log-handler=:INFO --log-level=info --log-db= --log-db-level=warning --workers=2 --max-cron-threads=2 --log-level=info --log-handler=:INFO --limit-time-cpu=120 --limit-time-real=240 --limit-request=8192 --limit-memory-soft=2147483648 --limit-memory-hard=2684354560 --transient-age-limit=1.0 --import-partial=False
|
||||
exec odoo --config ${ODOO_RC} --database= --init= --update= --load=${SERVER_WIDE_MODULES} --workers=${WORKERS} --log-handler=${LOG_HANDLER} --log-level=${LOG_LEVEL} --load-language= --without-demo=all --dev=False
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
@@ -72,4 +72,4 @@ case "$1" in
|
||||
exec "$@"
|
||||
esac
|
||||
|
||||
exit 1
|
||||
exit 1
|
||||
|
||||
2
odoo/extra-addons/.gitignore
vendored
2
odoo/extra-addons/.gitignore
vendored
@@ -1,2 +0,0 @@
|
||||
# Ignores any __pycache__ folder.
|
||||
__pycache__
|
||||
@@ -3,249 +3,258 @@
|
||||
; Options not exposed on the command line. ;
|
||||
;------------------------------------------;
|
||||
|
||||
admin_passwd=odoo
|
||||
csv_internal_sep=,
|
||||
publisher_warranty_url=http://services.openerp.com/publisher-warranty/
|
||||
root_path=/usr/lib/python3/dist-packages/odoo
|
||||
reportgz=False
|
||||
websocket_keep_alive_timeout=3600
|
||||
websocket_rate_limit_burst=10
|
||||
websocket_rate_limit_delay=0.2
|
||||
admin_passwd = {ADMIN_PASSWD}
|
||||
csv_internal_sep = {CSV_INTERNAL_SEP}
|
||||
publisher_warranty_url = {PUBLISHER_WARRANTY_URL}
|
||||
root_path = {ROOT_PATH}
|
||||
reportgz = {REPORTGZ}
|
||||
websocket_keep_alive_timeout = {WEBSOCKET_KEEP_ALIVE_TIMEOUT}
|
||||
websocket_rate_limit_burst = {WEBSOCKET_RATE_LIMIT_BURST}
|
||||
websocket_rate_limit_delay = {WEBSOCKET_RATE_LIMIT_DELAY}
|
||||
|
||||
;-----------------------;
|
||||
; Server startup config ;
|
||||
;-----------------------;
|
||||
; --config | -c
|
||||
config=/etc/odoo/odoo.conf
|
||||
config = {ODOO_RC}
|
||||
|
||||
; --save
|
||||
save=False
|
||||
save = {SAVE}
|
||||
|
||||
; --init | -i
|
||||
init=
|
||||
init = {INIT}
|
||||
|
||||
; --update | -u
|
||||
update=
|
||||
update = {UPDATE}
|
||||
|
||||
; --without-demo
|
||||
demo=False
|
||||
without_demo=all
|
||||
demo = {DEMO}
|
||||
without_demo = {WITHOUT_DEMO}
|
||||
|
||||
; --import-partial
|
||||
import_partial=
|
||||
import_partial = {IMPORT_PARTIAL}
|
||||
|
||||
; --pidfile
|
||||
pidfile=
|
||||
pidfile = {PIDFILE}
|
||||
|
||||
; --addons-path
|
||||
addons_path=/usr/lib/python3/dist-packages/odoo/addons,/usr/lib/python3/dist-packages/odoo/enterprise,/usr/lib/python3/dist-packages/odoo/extra-addons,/usr/lib/python3/dist-packages/odoo/custom-addons
|
||||
addons_path = {ADDONS_PATH}
|
||||
|
||||
; --upgrade-path
|
||||
upgrade_path=
|
||||
upgrade_path = {UPGRADE_PATH}
|
||||
|
||||
; --load
|
||||
server_wide_modules=base,web
|
||||
server_wide_modules = {SERVER_WIDE_MODULES}
|
||||
|
||||
; --data-dir
|
||||
data_dir=/var/lib/odoo
|
||||
data_dir = {DATA_DIR}
|
||||
|
||||
;------;
|
||||
; HTTP ;
|
||||
;------;
|
||||
; --http-interface | --xmlrpc-interface
|
||||
http_interface=0.0.0.0
|
||||
http_interface = {HTTP_INTERFACE}
|
||||
|
||||
; --http-port | -p | --xmlrpc-port
|
||||
http_port=8069
|
||||
http_port = {HTTP_PORT}
|
||||
|
||||
; --xmlrpcs-interface
|
||||
xmlrpcs_interface = {XMLRPCS_INTERFACE}
|
||||
|
||||
; --xmlrpcs-port
|
||||
xmlrpcs_port = {XMLRPCS_PORT}
|
||||
|
||||
; --longpolling_port
|
||||
longpolling_port=8072
|
||||
longpolling_port = {LONGPOLLING_PORT}
|
||||
|
||||
; --no-http | --no-xmlrpc
|
||||
http_enable=True
|
||||
http_enable = {HTTP_ENABLE}
|
||||
|
||||
; --no-xmlrpcs
|
||||
xmlrpcs = {XMLRPCS}
|
||||
|
||||
; --proxy-mode
|
||||
proxy_mode=True
|
||||
proxy_mode = {PROXY_MODE}
|
||||
|
||||
; --x-sendfile
|
||||
x_sendfile =False
|
||||
x_sendfile = {X_SENDFILE}
|
||||
|
||||
;---------------;
|
||||
; Testing Group ;
|
||||
;---------------;
|
||||
; --test-file
|
||||
test_file=False
|
||||
test_file = {TEST_FILE}
|
||||
|
||||
; --test-enable
|
||||
test_enable=False
|
||||
test_enable = {TEST_ENABLE}
|
||||
|
||||
; --test-tags
|
||||
test_tags=False
|
||||
test_tags = {TEST_FILE}
|
||||
|
||||
; --screencasts
|
||||
screencasts=None
|
||||
screencasts = {SCREENCASTS}
|
||||
|
||||
; --screenshots
|
||||
screenshots=/tmp/odoo_tests
|
||||
screenshots = {SCREENSHOTS}
|
||||
|
||||
;---------------;
|
||||
; Logging Group ;
|
||||
;---------------;
|
||||
; --logfile
|
||||
logfile=
|
||||
logfile = {LOGFILE}
|
||||
|
||||
; --syslog
|
||||
syslog=False
|
||||
syslog = {SYSLOG}
|
||||
|
||||
; --log-handler | --log-web (--log-handler=odoo.http:DEBUG) | --log-sql (--log-handler=odoo.sql_db:DEBUG)
|
||||
log_handler=[':INFO']
|
||||
log_handler = {LOG_HANDLER}
|
||||
|
||||
; --log-db
|
||||
log_db=False
|
||||
log_db = {LOG_DB}
|
||||
|
||||
; --log-db-level
|
||||
log_db_level=info
|
||||
log_db_level = {LOG_DB_LEVEL}
|
||||
|
||||
; --log-level
|
||||
log_level=info
|
||||
log_level = {LOG_LEVEL}
|
||||
|
||||
;------------;
|
||||
; SMTP Group ;
|
||||
;------------;
|
||||
; --email-from
|
||||
email_from=
|
||||
email_from = {EMAIL_FROM}
|
||||
|
||||
; --from-filter
|
||||
from_filter=False
|
||||
from_filter = {FROM_FILTER}
|
||||
|
||||
; --smtp
|
||||
smtp_server=
|
||||
smtp_server = {SMTP_SERVER}
|
||||
|
||||
; --smtp-port
|
||||
smtp_port=25
|
||||
smtp_port = {SMTP_PORT}
|
||||
|
||||
; --smtp-ssl
|
||||
smtp_ssl=
|
||||
smtp_ssl = {SMTP_SSL}
|
||||
|
||||
; --smtp-user
|
||||
smtp_user=
|
||||
smtp_user = {SMTP_USER}
|
||||
|
||||
; --smtp-password
|
||||
smtp_password=
|
||||
smtp_password = {SMTP_PASSWORD}
|
||||
|
||||
; --smtp-ssl-certificate-filename
|
||||
smtp_ssl_certificate_filename=False
|
||||
smtp_ssl_certificate_filename = {SMTP_SSL_CERTIFICATE_FILENAME}
|
||||
|
||||
; --smtp-ssl-private-key-filename
|
||||
smtp_ssl_private_key_filename=False
|
||||
smtp_ssl_private_key_filename = {SMTP_SSL_PRIVATE_KEY_FILENAME}
|
||||
|
||||
;----------;
|
||||
; DB Group ;
|
||||
;----------;
|
||||
; --database | -d
|
||||
db_name=odoo
|
||||
db_name = {DB_NAME}
|
||||
|
||||
; --db_user | -r
|
||||
db_user=odoo
|
||||
db_user = {DB_USER}
|
||||
|
||||
; --db_password | -w
|
||||
db_password=odoo
|
||||
db_password = {DB_PASSWORD}
|
||||
|
||||
; --pg_path
|
||||
pg_path=
|
||||
pg_path = {PG_PATH}
|
||||
|
||||
; --db_host
|
||||
db_host=postgres
|
||||
db_host = {DB_HOST}
|
||||
|
||||
; --db_port
|
||||
db_port=5432
|
||||
db_port = {DB_PORT}
|
||||
|
||||
; --db_sslmode
|
||||
db_sslmode=prefer
|
||||
db_sslmode = {DB_SSLMODE}
|
||||
|
||||
; --db_maxconn
|
||||
db_maxconn=64
|
||||
db_maxconn = {DB_MAXCONN}
|
||||
|
||||
; --db-template
|
||||
db_template=unaccent_template
|
||||
db_template = {DB_TEMPLATE}
|
||||
|
||||
;------------------------------;
|
||||
; Internationalisation options ;
|
||||
;------------------------------;
|
||||
; --load-language
|
||||
load_language=en_US
|
||||
load_language = {LOAD_LANGUAGE}
|
||||
|
||||
; --language
|
||||
language=
|
||||
language = {LANGUAGE}
|
||||
|
||||
; --i18n-export
|
||||
translate_out=
|
||||
translate_out = {TRANSLATE_OUT}
|
||||
|
||||
; --i18n-import
|
||||
translate_in=
|
||||
translate_in = {TRANSLATE_IN}
|
||||
|
||||
; --i18n-overwrite
|
||||
overwrite_existing_translations=False
|
||||
overwrite_existing_translations = {OVERWRITE_EXISTING_TRANSLATIONS}
|
||||
|
||||
; --modules
|
||||
translate_modules=['all']
|
||||
translate_modules = {TRANSLATE_MODULES}
|
||||
|
||||
;----------;
|
||||
; Security ;
|
||||
;----------;
|
||||
; --no-database-list
|
||||
list_db=True
|
||||
list_db = {LIST_DB}
|
||||
|
||||
;-----;
|
||||
; WEB ;
|
||||
;-----;
|
||||
; --db-filter
|
||||
dbfilter=.*
|
||||
dbfilter = {DBFILTER}
|
||||
|
||||
;------------------;
|
||||
; Advanced options ;
|
||||
;------------------;
|
||||
; --dev
|
||||
dev_mode=False
|
||||
; --dev (all, reload, qweb, werkzeug, sql, shell, assets, tests)
|
||||
dev_mode = {DEV_MODE}
|
||||
|
||||
; --shell-interface
|
||||
shell_interface=ptpython
|
||||
shell_interface = {SHELL_INTERFACE}
|
||||
|
||||
; --stop-after-init
|
||||
stop_after_init=False
|
||||
stop_after_init = {STOP_AFTER_INIT}
|
||||
|
||||
; --osv-memory-count-limit
|
||||
osv_memory_count_limit=False
|
||||
osv_memory_count_limit = {OSV_MEMORY_COUNT_LIMIT}
|
||||
|
||||
; --transient-age-limit (for deprecated --osv-memory-age-limit)
|
||||
transient_age_limit=1.0
|
||||
; --transient-age-limit | --osv-memory-age-limit (deprecated)
|
||||
transient_age_limit = {TRANSIENT_AGE_LIMIT}
|
||||
|
||||
; --max-cron-threads
|
||||
max_cron_threads=2
|
||||
max_cron_threads = {MAX_CRON_THREADS}
|
||||
|
||||
; --unaccent
|
||||
unaccent=True
|
||||
unaccent = {UNACCENT}
|
||||
|
||||
; --geoip-db
|
||||
geoip_database=/usr/share/GeoIP/GeoLite2-City.mmdb
|
||||
geoip_database = {GEOIP_DATABASE}
|
||||
|
||||
; --workers
|
||||
workers=0
|
||||
workers = {WORKERS}
|
||||
|
||||
; --limit-memory-soft
|
||||
limit_memory_soft=2147483648
|
||||
limit_memory_soft = {LIMIT_MEMORY_SOFT}
|
||||
|
||||
; --limit-memory-hard
|
||||
limit_memory_hard=2684354560
|
||||
limit_memory_hard = {LIMIT_MEMORY_HARD}
|
||||
|
||||
; --limit-time-cpu
|
||||
limit_time_cpu=120
|
||||
limit_time_cpu = {LIMIT_TIME_CPU}
|
||||
|
||||
; --limit-time-real
|
||||
limit_time_real=240
|
||||
limit_time_real = {LIMIT_TIME_REAL}
|
||||
|
||||
; --limit-time-real-cron
|
||||
limit_time_real_cron=600
|
||||
limit_time_real_cron = {LIMIT_TIME_REAL_CRON}
|
||||
|
||||
; --limit-request
|
||||
limit_request=8192
|
||||
limit_request = {LIMIT_REQUEST}
|
||||
|
||||
155
odoo/odoorc.sh
155
odoo/odoorc.sh
@@ -35,7 +35,7 @@ defaults=(
|
||||
[HTTP_PORT]=${HTTP_PORT}
|
||||
[XMLRPCS_INTERFACE]=${XMLRPCS_INTERFACE}
|
||||
[XMLRPCS_PORT]=${XMLRPCS_PORT}
|
||||
[GEVENT_PORT]=${GEVENT_PORT}
|
||||
[LONGPOLLING_PORT]=${LONGPOLLING_PORT}
|
||||
[HTTP_ENABLE]=${HTTP_ENABLE}
|
||||
[XMLRPCS]=${XMLRPCS}
|
||||
[PROXY_MODE]=${PROXY_MODE}
|
||||
@@ -86,7 +86,6 @@ defaults=(
|
||||
[LIST_DB]=${LIST_DB}
|
||||
|
||||
[DEV_MODE]=${DEV_MODE}
|
||||
[DEBUG_MODE]=${DEBUG_MODE}
|
||||
[SHELL_INTERFACE]=${SHELL_INTERFACE}
|
||||
[STOP_AFTER_INIT]=${STOP_AFTER_INIT}
|
||||
[OSV_MEMORY_COUNT_LIMIT]=${OSV_MEMORY_COUNT_LIMIT}
|
||||
@@ -122,252 +121,248 @@ websocket_rate_limit_delay = {WEBSOCKET_RATE_LIMIT_DELAY}
|
||||
;-----------------------;
|
||||
; Server startup config ;
|
||||
;-----------------------;
|
||||
; `--config | -c`
|
||||
; --config | -c
|
||||
config = {ODOO_RC}
|
||||
|
||||
; `--save`
|
||||
; --save
|
||||
save = {SAVE}
|
||||
|
||||
; `--init | -i`
|
||||
; --init | -i
|
||||
init = {INIT}
|
||||
|
||||
; `--update | -u`
|
||||
; --update | -u
|
||||
update = {UPDATE}
|
||||
|
||||
; `--without-demo`
|
||||
; --without-demo
|
||||
demo = {DEMO}
|
||||
without_demo = {WITHOUT_DEMO}
|
||||
|
||||
; `--import-partial`
|
||||
; --import-partial
|
||||
import_partial = {IMPORT_PARTIAL}
|
||||
|
||||
; `--pidfile`
|
||||
; --pidfile
|
||||
pidfile = {PIDFILE}
|
||||
|
||||
; `--addons-path`
|
||||
; --addons-path
|
||||
addons_path = {ADDONS_PATH}
|
||||
|
||||
; `--upgrade-path`
|
||||
; --upgrade-path
|
||||
upgrade_path = {UPGRADE_PATH}
|
||||
|
||||
; `--load`
|
||||
; --load
|
||||
server_wide_modules = {SERVER_WIDE_MODULES}
|
||||
|
||||
; `--data-dir`
|
||||
; --data-dir
|
||||
data_dir = {DATA_DIR}
|
||||
|
||||
;------;
|
||||
; HTTP ;
|
||||
;------;
|
||||
; `--http-interface | --xmlrpc-interface`
|
||||
; --http-interface | --xmlrpc-interface
|
||||
http_interface = {HTTP_INTERFACE}
|
||||
|
||||
; `--http-port | -p | --xmlrpc-port`
|
||||
; --http-port | -p | --xmlrpc-port
|
||||
http_port = {HTTP_PORT}
|
||||
|
||||
; `--xmlrpcs-interface`
|
||||
; --xmlrpcs-interface
|
||||
xmlrpcs_interface = {XMLRPCS_INTERFACE}
|
||||
|
||||
; `--xmlrpcs-port`
|
||||
; --xmlrpcs-port
|
||||
xmlrpcs_port = {XMLRPCS_PORT}
|
||||
|
||||
; `--gevent-port | --longpolling_port` (deprecated)
|
||||
gevent_port = {GEVENT_PORT}
|
||||
longpolling_port = 0
|
||||
; --longpolling_port
|
||||
longpolling_port = {LONGPOLLING_PORT}
|
||||
|
||||
; `--no-http | --no-xmlrpc`
|
||||
; --no-http | --no-xmlrpc
|
||||
http_enable = {HTTP_ENABLE}
|
||||
|
||||
; `--no-xmlrpcs`
|
||||
; --no-xmlrpcs
|
||||
xmlrpcs = {XMLRPCS}
|
||||
|
||||
; `--proxy-mode`
|
||||
; --proxy-mode
|
||||
proxy_mode = {PROXY_MODE}
|
||||
|
||||
; `--x-sendfile`
|
||||
; --x-sendfile
|
||||
x_sendfile = {X_SENDFILE}
|
||||
|
||||
;---------------;
|
||||
; Testing Group ;
|
||||
;---------------;
|
||||
; `--test-file`
|
||||
; --test-file
|
||||
test_file = {TEST_FILE}
|
||||
|
||||
; `--test-enable`
|
||||
; --test-enable
|
||||
test_enable = {TEST_ENABLE}
|
||||
|
||||
; `--test-tags`
|
||||
; --test-tags
|
||||
test_tags = {TEST_FILE}
|
||||
|
||||
; `--screencasts`
|
||||
; --screencasts
|
||||
screencasts = {SCREENCASTS}
|
||||
|
||||
; `--screenshots`
|
||||
; --screenshots
|
||||
screenshots = {SCREENSHOTS}
|
||||
|
||||
;---------------;
|
||||
; Logging Group ;
|
||||
;---------------;
|
||||
; `--logfile`
|
||||
; --logfile
|
||||
logfile = {LOGFILE}
|
||||
|
||||
; `--syslog`
|
||||
; --syslog
|
||||
syslog = {SYSLOG}
|
||||
|
||||
; `--log-handler | --log-web (--log-handler=odoo.http:DEBUG) | --log-sql (--log-handler=odoo.sql_db:DEBUG)`
|
||||
; --log-handler | --log-web (--log-handler=odoo.http:DEBUG) | --log-sql (--log-handler=odoo.sql_db:DEBUG)
|
||||
log_handler = {LOG_HANDLER}
|
||||
|
||||
; `--log-db`
|
||||
; --log-db
|
||||
log_db = {LOG_DB}
|
||||
|
||||
; `--log-db-level`
|
||||
; --log-db-level
|
||||
log_db_level = {LOG_DB_LEVEL}
|
||||
|
||||
; `--log-level`
|
||||
; --log-level
|
||||
log_level = {LOG_LEVEL}
|
||||
|
||||
;------------;
|
||||
; SMTP Group ;
|
||||
;------------;
|
||||
; `--email-from`
|
||||
; --email-from
|
||||
email_from = {EMAIL_FROM}
|
||||
|
||||
; `--from-filter`
|
||||
; --from-filter
|
||||
from_filter = {FROM_FILTER}
|
||||
|
||||
; `--smtp`
|
||||
; --smtp
|
||||
smtp_server = {SMTP_SERVER}
|
||||
|
||||
; `--smtp-port`
|
||||
; --smtp-port
|
||||
smtp_port = {SMTP_PORT}
|
||||
|
||||
; `--smtp-ssl`
|
||||
; --smtp-ssl
|
||||
smtp_ssl = {SMTP_SSL}
|
||||
|
||||
; `--smtp-user`
|
||||
; --smtp-user
|
||||
smtp_user = {SMTP_USER}
|
||||
|
||||
; `--smtp-password`
|
||||
; --smtp-password
|
||||
smtp_password = {SMTP_PASSWORD}
|
||||
|
||||
; `--smtp-ssl-certificate-filename`
|
||||
; --smtp-ssl-certificate-filename
|
||||
smtp_ssl_certificate_filename = {SMTP_SSL_CERTIFICATE_FILENAME}
|
||||
|
||||
; `--smtp-ssl-private-key-filename`
|
||||
; --smtp-ssl-private-key-filename
|
||||
smtp_ssl_private_key_filename = {SMTP_SSL_PRIVATE_KEY_FILENAME}
|
||||
|
||||
;----------;
|
||||
; DB Group ;
|
||||
;----------;
|
||||
; `--database | -d`
|
||||
; --database | -d
|
||||
db_name = {DB_NAME}
|
||||
|
||||
; `--db_user | -r`
|
||||
; --db_user | -r
|
||||
db_user = {DB_USER}
|
||||
|
||||
; `--db_password | -w`
|
||||
; --db_password | -w
|
||||
db_password = {DB_PASSWORD}
|
||||
|
||||
; `--pg_path`
|
||||
; --pg_path
|
||||
pg_path = {PG_PATH}
|
||||
|
||||
; `--db_host`
|
||||
; --db_host
|
||||
db_host = {DB_HOST}
|
||||
|
||||
; `--db_port`
|
||||
; --db_port
|
||||
db_port = {DB_PORT}
|
||||
|
||||
; `--db_sslmode`
|
||||
; --db_sslmode
|
||||
db_sslmode = {DB_SSLMODE}
|
||||
|
||||
; `--db_maxconn`
|
||||
; --db_maxconn
|
||||
db_maxconn = {DB_MAXCONN}
|
||||
|
||||
; `--db-template`
|
||||
; --db-template
|
||||
db_template = {DB_TEMPLATE}
|
||||
|
||||
;------------------------------;
|
||||
; Internationalisation options ;
|
||||
;------------------------------;
|
||||
; `--load-language`
|
||||
; --load-language
|
||||
load_language = {LOAD_LANGUAGE}
|
||||
|
||||
; `--language`
|
||||
; --language
|
||||
language = {LANGUAGE}
|
||||
|
||||
; `--i18n-export`
|
||||
; --i18n-export
|
||||
translate_out = {TRANSLATE_OUT}
|
||||
|
||||
; `--i18n-import`
|
||||
; --i18n-import
|
||||
translate_in = {TRANSLATE_IN}
|
||||
|
||||
; `--i18n-overwrite`
|
||||
; --i18n-overwrite
|
||||
overwrite_existing_translations = {OVERWRITE_EXISTING_TRANSLATIONS}
|
||||
|
||||
; `--modules `
|
||||
; --modules
|
||||
translate_modules = {TRANSLATE_MODULES}
|
||||
|
||||
;----------;
|
||||
; Security ;
|
||||
;----------;
|
||||
; `--no-database-list`
|
||||
; --no-database-list
|
||||
list_db = {LIST_DB}
|
||||
|
||||
;-----;
|
||||
; WEB ;
|
||||
;-----;
|
||||
; `--db-filter`
|
||||
; --db-filter
|
||||
dbfilter = {DBFILTER}
|
||||
|
||||
;------------------;
|
||||
; Advanced options ;
|
||||
;------------------;
|
||||
; `--dev`
|
||||
; --dev
|
||||
dev_mode = {DEV_MODE}
|
||||
|
||||
;
|
||||
debug_mode = {DEV_MODE}
|
||||
|
||||
; `--shell-interface`
|
||||
; --shell-interface
|
||||
shell_interface = {SHELL_INTERFACE}
|
||||
|
||||
; `--stop-after-init`
|
||||
; --stop-after-init
|
||||
stop_after_init = {STOP_AFTER_INIT}
|
||||
|
||||
; `--osv-memory-count-limit`
|
||||
; --osv-memory-count-limit
|
||||
osv_memory_count_limit = {OSV_MEMORY_COUNT_LIMIT}
|
||||
|
||||
; `--transient-age-limit | --osv-memory-age-limit` (deprecated)
|
||||
; --transient-age-limit | --osv-memory-age-limit (deprecated)
|
||||
transient_age_limit = {TRANSIENT_AGE_LIMIT}
|
||||
|
||||
; `--max-cron-threads`
|
||||
; --max-cron-threads
|
||||
max_cron_threads = {MAX_CRON_THREADS}
|
||||
|
||||
; `--unaccent`
|
||||
; --unaccent
|
||||
unaccent = {UNACCENT}
|
||||
|
||||
; `--geoip-db`
|
||||
; --geoip-db
|
||||
geoip_database = {GEOIP_DATABASE}
|
||||
|
||||
; `--workers`
|
||||
; --workers
|
||||
workers = {WORKERS}
|
||||
|
||||
; `--limit-memory-soft`
|
||||
; --limit-memory-soft
|
||||
limit_memory_soft = {LIMIT_MEMORY_SOFT}
|
||||
|
||||
; `--limit-memory-hard`
|
||||
; --limit-memory-hard
|
||||
limit_memory_hard = {LIMIT_MEMORY_HARD}
|
||||
|
||||
; `--limit-time-cpu`
|
||||
; --limit-time-cpu
|
||||
limit_time_cpu = {LIMIT_TIME_CPU}
|
||||
|
||||
; `--limit-time-real`
|
||||
; --limit-time-real
|
||||
limit_time_real = {LIMIT_TIME_REAL}
|
||||
|
||||
; `--limit-time-real-cron`
|
||||
; --limit-time-real-cron
|
||||
limit_time_real_cron = {LIMIT_TIME_REAL_CRON}
|
||||
|
||||
; `--limit-request`
|
||||
; --limit-request
|
||||
limit_request = {LIMIT_REQUEST}
|
||||
EOF
|
||||
)
|
||||
@@ -381,4 +376,4 @@ for key in "${!defaults[@]}"; do
|
||||
done
|
||||
|
||||
# Store the result to the odoo.conf file
|
||||
echo "$template" > ${ODOO_RC}
|
||||
echo "$template" > ${ODOO_RC}
|
||||
|
||||
@@ -1 +1,5 @@
|
||||
debugpy
|
||||
jinja2
|
||||
sortedcontainers
|
||||
debugpy
|
||||
websocket-client
|
||||
pyOpenSSL
|
||||
|
||||
Reference in New Issue
Block a user