integrate keydb to odoocker

This commit is contained in:
Yhael S
2023-09-27 22:47:22 -05:00
parent dddafd862f
commit fc0d0c9875
18 changed files with 415 additions and 97 deletions

View File

@@ -14,6 +14,7 @@ ARG LOG_PATH
ARG GITHUB_USER
ARG GITHUB_ACCESS_TOKEN
ARG ENTERPRISE_ADDONS
ARG THIRD_PARTY_ADDONS
ARG ODOO_RC
ENV ODOO_TAG=${ODOO_TAG} \
@@ -21,6 +22,7 @@ ENV ODOO_TAG=${ODOO_TAG} \
GITHUB_USER=${GITHUB_USER} \
GITHUB_ACCESS_TOKEN=${GITHUB_ACCESS_TOKEN} \
ENTERPRISE_ADDONS=${ENTERPRISE_ADDONS} \
THIRD_PARTY_ADDONS=${THIRD_PARTY_ADDONS} \
ODOO_RC=${ODOO_RC}
#------------------------#
@@ -55,6 +57,16 @@ RUN if [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then \
git clone https://${GITHUB_USER}:${GITHUB_ACCESS_TOKEN}@github.com/odoo/enterprise.git ${ENTERPRISE_ADDONS} --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags; \
fi
#-------------------------#
# Odoo Extra Addons #
#-------------------------#
RUN mkdir -p ${THIRD_PARTY_ADDONS} && \
chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
COPY --chown=odoo:odoo ./odoo/third-party-addons.sh /
RUN /third-party-addons.sh && chown odoo:odoo ${THIRD_PARTY_ADDONS}
#---------------------#
# PIP Dependecies #
#---------------------#
@@ -64,7 +76,7 @@ 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 && \
RUN python3 -m pip install -r /tmp/requirements.txt && \
rm /tmp/requirements.txt
#---------------------#

View File

@@ -1,8 +1,8 @@
{
'name': 'Report URL',
'summary': 'Adds Report URL to Odoo Container',
'name': 'Odoocker Base',
'summary': 'Supercharge Odoo with Odoocker',
'description': '''
Odoo Containers doesn't come with report.url param out of the box, so we add it for you to work with Odoocker.
Some Odoocker dependencies require to some custom values that we cover with this Addon for you.
''',
'version': '1.0.0',
'category': 'Technical',

View File

@@ -48,6 +48,11 @@
# ... other qweb templates
],
'assets': {
'web.assets_frontend': [
'module_name/static/src/js/file.js',
'module_name/static/src/css/style.css'
# ... other assets
],
'web.assets_backend': [
'module_name/static/src/js/file.js',
'module_name/static/src/css/style.css'

View File

@@ -64,9 +64,8 @@ xmlrpcs_interface = {XMLRPCS_INTERFACE}
; --xmlrpcs-port
xmlrpcs_port = {XMLRPCS_PORT}
; --gevent-port | --longpolling_port (deprecated)
; --longpolling_port
gevent_port = {GEVENT_PORT}
longpolling_port = False
; --no-http | --no-xmlrpc
http_enable = {HTTP_ENABLE}
@@ -215,7 +214,7 @@ dbfilter = {DBFILTER}
;------------------;
; Advanced options ;
;------------------;
; --dev (all, reload, qweb, werkzeug, sql, shell, assets, tests)
; --dev
dev_mode = {DEV_MODE}
; --shell-interface
@@ -260,22 +259,29 @@ limit_time_real_cron = {LIMIT_TIME_REAL_CRON}
; --limit-request
limit_request = {LIMIT_REQUEST}
;------------------------------------------;
; Options not exposed on the command line. ;
;------------------------------------------;
; --ODOO_SESSION_REDIS
ODOO_SESSION_REDIS = {ODOO_SESSION_REDIS} ;has to be 1 or true
; --ODOO_SESSION_REDIS_HOST
ODOO_SESSION_REDIS_HOST = {ODOO_SESSION_REDIS_HOST} ;is the redis hostname (default is localhost)
; --ODOO_SESSION_REDIS_PORT
ODOO_SESSION_REDIS_PORT = {ODOO_SESSION_REDIS_PORT} ;is the redis port (default is 6379)
; --ODOO_SESSION_REDIS_PASSWORD
ODOO_SESSION_REDIS_PASSWORD = {ODOO_SESSION_REDIS_PASSWORD} ;is the password for the AUTH command (optional)
; -- ODOO_SESSION_REDIS_URL
ODOO_SESSION_REDIS_URL = {ODOO_SESSION_REDIS_URL} ;is an alternative way to define the Redis server address. It's the preferred way when you're using the rediss:// protocol.
; -- ODOO_SESSION_REDIS_PREFIX
ODOO_SESSION_REDIS_PREFIX = {ODOO_SESSION_REDIS_PREFIX} ;is the prefix for the session keys (optional)
; -- ODOO_SESSION_REDIS_EXPIRATION
ODOO_SESSION_REDIS_EXPIRATION = {ODOO_SESSION_REDIS_EXPIRATION} ;is the time in seconds before expiration of the sessions (default is 7 days)
; -- ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = {ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS} ;the time in seconds before expiration of the anonymous sessions (default is 3 hours)
;-------------;
; Redis ;
;-------------;
; has to be 1 or true
ODOO_SESSION_REDIS = {ODOO_SESSION_REDIS}
; is the redis hostname (default is localhost)
ODOO_SESSION_REDIS_HOST = {ODOO_SESSION_REDIS_HOST}
; is the redis port (default is 6379)
ODOO_SESSION_REDIS_PORT = {ODOO_SESSION_REDIS_PORT}
; is the password for the AUTH command (optional)
ODOO_SESSION_REDIS_PASSWORD = {ODOO_SESSION_REDIS_PASSWORD}
; is an alternative way to define the Redis server address. It's the preferred way when you're using the rediss:// protocol.
ODOO_SESSION_REDIS_URL = {ODOO_SESSION_REDIS_URL}
; is the prefix for the session keys (optional)
ODOO_SESSION_REDIS_PREFIX = {ODOO_SESSION_REDIS_PREFIX}
; is the time in seconds before expiration of the sessions (default is 7 days)
ODOO_SESSION_REDIS_EXPIRATION = {ODOO_SESSION_REDIS_EXPIRATION}
; the time in seconds before expiration of the anonymous sessions (default is 3 hours)
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = {ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS}

View File

@@ -100,6 +100,22 @@ defaults=(
[LIMIT_TIME_REAL]=${LIMIT_TIME_REAL}
[LIMIT_TIME_REAL_CRON]=${LIMIT_TIME_REAL_CRON}
[LIMIT_REQUEST]=${LIMIT_REQUEST}
[ODOO_SESSION_REDIS]=${ODOO_SESSION_REDIS}
[ODOO_SESSION_REDIS_HOST]=${ODOO_SESSION_REDIS_HOST}
[ODOO_SESSION_REDIS_PORT]=${ODOO_SESSION_REDIS_PORT}
[ODOO_SESSION_REDIS_PASSWORD]=${ODOO_SESSION_REDIS_PASSWORD}
[ODOO_SESSION_REDIS_URL]=${ODOO_SESSION_REDIS_URL}
[ODOO_SESSION_REDIS_PREFIX]=${ODOO_SESSION_REDIS_PREFIX}
[ODOO_SESSION_REDIS_EXPIRATION]=${ODOO_SESSION_REDIS_EXPIRATION}
[ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS]=${ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS}
[DISABLE_ATTACHMENT_STORAGE]=${DISABLE_ATTACHMENT_STORAGE}
[AWS_HOST]=${AWS_HOST}
[AWS_REGION]=${AWS_REGION}
[AWS_ACCESS_KEY_ID]=${AWS_ACCESS_KEY_ID}
[AWS_SECRET_ACCESS_KEY]=${AWS_SECRET_ACCESS_KEY}
[AWS_BUCKETNAME]=${AWS_BUCKETNAME}
)
# Define the template
@@ -172,7 +188,6 @@ xmlrpcs_port = {XMLRPCS_PORT}
; --gevent-port | --longpolling_port (deprecated)
gevent_port = {GEVENT_PORT}
longpolling_port = False
; --no-http | --no-xmlrpc
http_enable = {HTTP_ENABLE}
@@ -365,6 +380,34 @@ limit_time_real_cron = {LIMIT_TIME_REAL_CRON}
; --limit-request
limit_request = {LIMIT_REQUEST}
;-------------;
; Redis ;
;-------------;
; has to be 1 or true
ODOO_SESSION_REDIS = {ODOO_SESSION_REDIS}
; is the redis hostname (default is localhost)
ODOO_SESSION_REDIS_HOST = {ODOO_SESSION_REDIS_HOST}
; is the redis port (default is 6379)
ODOO_SESSION_REDIS_PORT = {ODOO_SESSION_REDIS_PORT}
; is the password for the AUTH command (optional)
ODOO_SESSION_REDIS_PASSWORD = {ODOO_SESSION_REDIS_PASSWORD}
; is an alternative way to define the Redis server address. It's the preferred way when you're using the rediss:// protocol.
ODOO_SESSION_REDIS_URL = {ODOO_SESSION_REDIS_URL}
; is the prefix for the session keys (optional)
ODOO_SESSION_REDIS_PREFIX = {ODOO_SESSION_REDIS_PREFIX}
; is the time in seconds before expiration of the sessions (default is 7 days)
ODOO_SESSION_REDIS_EXPIRATION = {ODOO_SESSION_REDIS_EXPIRATION}
; the time in seconds before expiration of the anonymous sessions (default is 3 hours)
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = {ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS}
EOF
)

View File

@@ -1,3 +1,3 @@
debugpy
websocket-client
redis
redis

2
odoo/third-party-addons.sh Executable file
View File

@@ -0,0 +1,2 @@
git clone https://github.com/camptocamp/odoo-cloud-platform.git --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags;
cp -r odoo-cloud-platform/session_redis ${THIRD_PARTY_ADDONS}/session_redis