mirror of
https://github.com/odoocker/odoocker
synced 2025-11-05 07:39:23 +01:00
Merge pull request #4 from odoocker/feature/s3-integration
Yhael | Feature | S3 Integration
This commit is contained in:
36
.env.example
36
.env.example
@@ -5,7 +5,7 @@
|
|||||||
APP_ENV=local
|
APP_ENV=local
|
||||||
INIT=
|
INIT=
|
||||||
UPDATE=
|
UPDATE=
|
||||||
LOAD=base,web,session_redis
|
LOAD=base,web,session_redis,attachment_s3
|
||||||
WORKERS=2
|
WORKERS=2
|
||||||
DEV_MODE=reload,xml
|
DEV_MODE=reload,xml
|
||||||
DOMAIN=erp.odoocker.test
|
DOMAIN=erp.odoocker.test
|
||||||
@@ -68,6 +68,17 @@ REDIS_URL=
|
|||||||
REDIS_PREFIX=odoo
|
REDIS_PREFIX=odoo
|
||||||
REDIS_EXPIRATION=604800
|
REDIS_EXPIRATION=604800
|
||||||
REDIS_EXPIRATION_ANONYMOUS=10800
|
REDIS_EXPIRATION_ANONYMOUS=10800
|
||||||
|
REDIS_DATA=/var/lib/keydb
|
||||||
|
|
||||||
|
# Filesystem
|
||||||
|
S3_VIRTUAL_HOST=s3.odoocker.test
|
||||||
|
S3_API_PORT=9000
|
||||||
|
S3_CONSOLE_PORT=9001
|
||||||
|
AWS_ACCESS_KEY_ID=myaccesskey
|
||||||
|
AWS_SECRET_ACCESS_KEY=mysecretkey
|
||||||
|
AWS_BUCKETNAME=odoocker
|
||||||
|
AWS_HOST=http://s3:${S3_API_PORT}
|
||||||
|
AWS_REGION=
|
||||||
|
|
||||||
# PgAdmin
|
# PgAdmin
|
||||||
PGADMIN_DOMAIN=pgadmin.odoocker.test
|
PGADMIN_DOMAIN=pgadmin.odoocker.test
|
||||||
@@ -92,6 +103,8 @@ SUPPORT_EMAIL=mail@example.com
|
|||||||
# Containers' Tags
|
# Containers' Tags
|
||||||
ODOO_TAG=16.0
|
ODOO_TAG=16.0
|
||||||
POSTGRES_TAG=16.0
|
POSTGRES_TAG=16.0
|
||||||
|
REDIS_TAG=latest
|
||||||
|
S3_TAG=latest
|
||||||
NGINX_TAG=1.25.2
|
NGINX_TAG=1.25.2
|
||||||
NGINX_PROXY_TAG=1.3.1
|
NGINX_PROXY_TAG=1.3.1
|
||||||
ACME_COMPANION_TAG=2.2.8
|
ACME_COMPANION_TAG=2.2.8
|
||||||
@@ -120,7 +133,7 @@ LOG_PATH=/var/log/odoo/odoo.log
|
|||||||
DEBUG_PATH=/usr/bin/odoo
|
DEBUG_PATH=/usr/bin/odoo
|
||||||
|
|
||||||
# Server startup config
|
# Server startup config
|
||||||
ODOO_RC=/etc/odoo/odoo.conf
|
ODOO_RC=${ROOT_PATH}/odoo.conf
|
||||||
SAVE=False
|
SAVE=False
|
||||||
INIT=${INIT}
|
INIT=${INIT}
|
||||||
UPDATE=${UPDATE}
|
UPDATE=${UPDATE}
|
||||||
@@ -156,6 +169,7 @@ SCREENSHOTS=/tmp/odoo_tests
|
|||||||
# Logging
|
# Logging
|
||||||
LOG_LEVEL=${LOG_LEVEL}
|
LOG_LEVEL=${LOG_LEVEL}
|
||||||
LOG_HANDLER=odoo.http.rpc.request:${LOG_HANDLER_LEVEL},odoo.http.rpc.response:${LOG_HANDLER_LEVEL},:${LOG_HANDLER_LEVEL},odoo.sql_db:${LOG_HANDLER_LEVEL}
|
LOG_HANDLER=odoo.http.rpc.request:${LOG_HANDLER_LEVEL},odoo.http.rpc.response:${LOG_HANDLER_LEVEL},:${LOG_HANDLER_LEVEL},odoo.sql_db:${LOG_HANDLER_LEVEL}
|
||||||
|
LOG_DB=False
|
||||||
LOG_DB_LEVEL=${LOG_LEVEL}
|
LOG_DB_LEVEL=${LOG_LEVEL}
|
||||||
SYSLOG=False
|
SYSLOG=False
|
||||||
LOGFILE=
|
LOGFILE=
|
||||||
@@ -265,6 +279,24 @@ ODOO_SESSION_REDIS_PREFIX=${REDIS_PREFIX}
|
|||||||
ODOO_SESSION_REDIS_EXPIRATION=${REDIS_EXPIRATION}
|
ODOO_SESSION_REDIS_EXPIRATION=${REDIS_EXPIRATION}
|
||||||
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS=${REDIS_EXPIRATION_ANONYMOUS}
|
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS=${REDIS_EXPIRATION_ANONYMOUS}
|
||||||
|
|
||||||
|
#----------#
|
||||||
|
# S3 #
|
||||||
|
#----------#
|
||||||
|
AWS_ACCESS_KEY_ID=${AWS_ACCESS_KEY_ID}
|
||||||
|
AWS_SECRET_ACCESS_KEY=${AWS_SECRET_ACCESS_KEY}
|
||||||
|
AWS_REGION=${AWS_REGION}
|
||||||
|
AWS_HOST=${AWS_HOST}
|
||||||
|
AWS_BUCKETNAME=${AWS_BUCKETNAME}
|
||||||
|
|
||||||
|
DISABLE_ATTACHMENT_STORAGE=0
|
||||||
|
MINIO_ROOT_USER=${AWS_ACCESS_KEY_ID}
|
||||||
|
MINIO_ROOT_PASSWORD=${AWS_SECRET_ACCESS_KEY}
|
||||||
|
MINIO_VIRTUAL_HOST=${S3_VIRTUAL_HOST}
|
||||||
|
MINIO_BROWSER_REDIRECT_URL=http://${MINIO_VIRTUAL_HOST}
|
||||||
|
MINIO_API_PORT=${S3_API_PORT}
|
||||||
|
MINIO_CONSOLE_PORT=${S3_CONSOLE_PORT}
|
||||||
|
MINIO_DATA=/data
|
||||||
|
|
||||||
#-------------#
|
#-------------#
|
||||||
# PgAdmin #
|
# PgAdmin #
|
||||||
#-------------#
|
#-------------#
|
||||||
|
|||||||
@@ -20,10 +20,26 @@ services:
|
|||||||
- ./odoo/extra-addons:${EXTRA_ADDONS}
|
- ./odoo/extra-addons:${EXTRA_ADDONS}
|
||||||
- ./odoo/custom-addons:${CUSTOM_ADDONS}
|
- ./odoo/custom-addons:${CUSTOM_ADDONS}
|
||||||
- ./odoo/entrypoint.sh:/entrypoint.sh
|
- ./odoo/entrypoint.sh:/entrypoint.sh
|
||||||
- ./odoo/odoorc.sh:/odoorc.sh
|
environment:
|
||||||
- ./odoo/third-party-addons.sh:/third-party-addons.sh
|
- HOST=${DB_HOST}
|
||||||
env_file:
|
- PORT=${DB_PORT}
|
||||||
- ./.env
|
- USER=${DB_USER}
|
||||||
|
- PASSWORD=${DB_PASSWORD}
|
||||||
|
- ODOO_TAG
|
||||||
|
- THIRD_PARTY_ADDONS
|
||||||
|
- ODOO_SESSION_REDIS
|
||||||
|
- ODOO_SESSION_REDIS_HOST
|
||||||
|
- ODOO_SESSION_REDIS_PORT
|
||||||
|
- ODOO_SESSION_REDIS_PASSWORD
|
||||||
|
- ODOO_SESSION_REDIS_URL
|
||||||
|
- ODOO_SESSION_REDIS_PREFIX
|
||||||
|
- ODOO_SESSION_REDIS_EXPIRATION
|
||||||
|
- ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS
|
||||||
|
- AWS_HOST
|
||||||
|
- AWS_REGION
|
||||||
|
- AWS_ACCESS_KEY_ID
|
||||||
|
- AWS_SECRET_ACCESS_KEY
|
||||||
|
- AWS_BUCKETNAME
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
@@ -53,15 +69,32 @@ services:
|
|||||||
- internal
|
- internal
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: eqalpha/keydb:latest
|
image: eqalpha/keydb:${REDIS_TAG}
|
||||||
platform: linux/amd64
|
platform: linux/amd64
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- ${REDIS_PORT}:${REDIS_PORT}
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- redis-data:${REDIS_DATA}
|
||||||
networks:
|
networks:
|
||||||
- internal
|
- internal
|
||||||
|
|
||||||
|
s3:
|
||||||
|
image: minio/minio:${S3_TAG}
|
||||||
|
environment:
|
||||||
|
- MINIO_ROOT_USER
|
||||||
|
- MINIO_ROOT_PASSWORD
|
||||||
|
- MINIO_BROWSER_REDIRECT_URL
|
||||||
|
- VIRTUAL_HOST=${MINIO_VIRTUAL_HOST}
|
||||||
|
- VIRTUAL_PORT=${MINIO_CONSOLE_PORT}
|
||||||
|
command: server ${MINIO_DATA} --console-address ":${MINIO_CONSOLE_PORT}"
|
||||||
volumes:
|
volumes:
|
||||||
- redis-data:/var/lib/keydb
|
- s3-data:${MINIO_DATA}
|
||||||
|
ports:
|
||||||
|
- ${MINIO_API_PORT}:${MINIO_API_PORT}
|
||||||
|
- ${MINIO_CONSOLE_PORT}:${MINIO_CONSOLE_PORT}
|
||||||
|
networks:
|
||||||
|
- internal
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
image: nginx:${NGINX_TAG}
|
image: nginx:${NGINX_TAG}
|
||||||
@@ -105,6 +138,7 @@ volumes:
|
|||||||
odoo-data:
|
odoo-data:
|
||||||
pg-data:
|
pg-data:
|
||||||
redis-data:
|
redis-data:
|
||||||
|
s3-data:
|
||||||
certs:
|
certs:
|
||||||
vhost:
|
vhost:
|
||||||
html:
|
html:
|
||||||
|
|||||||
@@ -44,6 +44,18 @@ RUN apt-get update && apt-get install -y \
|
|||||||
# Clean up the apt cache to reduce the image size
|
# Clean up the apt cache to reduce the image size
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
#---------------------#
|
||||||
|
# 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 -r /tmp/requirements.txt && \
|
||||||
|
rm /tmp/requirements.txt
|
||||||
|
|
||||||
#-----------------------#
|
#-----------------------#
|
||||||
# Odoo Enterprise #
|
# Odoo Enterprise #
|
||||||
#-----------------------#
|
#-----------------------#
|
||||||
@@ -61,23 +73,11 @@ RUN if [ -n "$GITHUB_USER" ] && [ -n "$GITHUB_ACCESS_TOKEN" ]; then \
|
|||||||
# Odoo Extra Addons #
|
# Odoo Extra Addons #
|
||||||
#-------------------------#
|
#-------------------------#
|
||||||
|
|
||||||
RUN mkdir -p ${THIRD_PARTY_ADDONS} && \
|
RUN mkdir -p ${THIRD_PARTY_ADDONS} && chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
|
||||||
chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
|
|
||||||
|
|
||||||
|
COPY --chown=odoo:odoo ./odoo/fix-manifest.py /
|
||||||
COPY --chown=odoo:odoo ./odoo/third-party-addons.sh /
|
COPY --chown=odoo:odoo ./odoo/third-party-addons.sh /
|
||||||
RUN /third-party-addons.sh && chown odoo:odoo ${THIRD_PARTY_ADDONS}
|
RUN /third-party-addons.sh && chown odoo:odoo -R ${THIRD_PARTY_ADDONS}
|
||||||
|
|
||||||
#---------------------#
|
|
||||||
# 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 -r /tmp/requirements.txt && \
|
|
||||||
rm /tmp/requirements.txt
|
|
||||||
|
|
||||||
#---------------------#
|
#---------------------#
|
||||||
# Logging #
|
# Logging #
|
||||||
@@ -92,6 +92,7 @@ RUN touch ${LOG_PATH} && chown odoo:odoo ${LOG_PATH}
|
|||||||
|
|
||||||
# Copy environment variables & script to generate odoo.conf
|
# Copy environment variables & script to generate odoo.conf
|
||||||
COPY --chown=odoo:odoo ./.env /
|
COPY --chown=odoo:odoo ./.env /
|
||||||
|
COPY --chown=odoo:odoo ./odoo/odoo.conf /
|
||||||
COPY --chown=odoo:odoo ./odoo/odoorc.sh /
|
COPY --chown=odoo:odoo ./odoo/odoorc.sh /
|
||||||
|
|
||||||
# Generate odoo.conf
|
# Generate odoo.conf
|
||||||
|
|||||||
@@ -2,6 +2,18 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
while IFS='=' read -r key value || [[ -n $key ]]; do
|
||||||
|
# Skip comments and empty lines
|
||||||
|
[[ $key =~ ^#.* ]] || [[ -z $key ]] && continue
|
||||||
|
|
||||||
|
# Removing any quotes around the value
|
||||||
|
value=${value%\"}
|
||||||
|
value=${value#\"}
|
||||||
|
|
||||||
|
# Declare variable
|
||||||
|
eval "$key=\"$value\""
|
||||||
|
done < .env
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-- | odoo)
|
-- | odoo)
|
||||||
shift
|
shift
|
||||||
@@ -9,7 +21,7 @@ case "$1" in
|
|||||||
# Creates new module.
|
# Creates new module.
|
||||||
exec odoo "$@"
|
exec odoo "$@"
|
||||||
else
|
else
|
||||||
wait-for-psql.py --db_host ${DB_HOST} --db_port ${DB_PORT} --db_user ${DB_USER} --db_password ${DB_PASSWORD} --timeout=30
|
wait-for-psql.py --db_host ${HOST} --db_port ${PORT} --db_user ${USER} --db_password ${PASSWORD} --timeout=30
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'fresh' ] || [ ${APP_ENV} = 'restore' ]; then
|
if [ ${APP_ENV} = 'fresh' ] || [ ${APP_ENV} = 'restore' ]; then
|
||||||
# Ideal for a fresh install or restore a production database.
|
# Ideal for a fresh install or restore a production database.
|
||||||
@@ -18,13 +30,6 @@ case "$1" in
|
|||||||
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
exec odoo --config ${ODOO_RC} --database= --init= --update= --load-language= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'full' ] ; then
|
|
||||||
# Ideal for initializing a fresh database with a huge amount of addons.
|
|
||||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update= --load=${SERVER_WIDE_MODULES} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --max-cron-threads=${MAX_CRON_THREADS} --limit-time-cpu=3600 --limit-time-real=7200
|
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --update= --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'local' ] ; then
|
if [ ${APP_ENV} = 'local' ] ; then
|
||||||
# Listens to all .env variables mapped into odoo.conf file.
|
# Listens to all .env variables mapped into odoo.conf file.
|
||||||
echo odoo --config ${ODOO_RC}
|
echo odoo --config ${ODOO_RC}
|
||||||
@@ -41,16 +46,16 @@ case "$1" in
|
|||||||
|
|
||||||
if [ ${APP_ENV} = 'testing' ] ; then
|
if [ ${APP_ENV} = 'testing' ] ; then
|
||||||
# Initializies a fresh 'test_*' database, installs the addons to test, and runs tests you specify in the test tags.
|
# Initializies a fresh 'test_*' database, installs the addons to test, and runs tests you specify in the 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-level=${LOG_LEVEL} --without-demo= --workers=0 --stop-after-init
|
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-level=${LOG_LEVEL} --without-demo= --workers=0 --dev= --stop-after-init
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --without-demo= --workers=0 --stop-after-init
|
exec odoo --config ${ODOO_RC} --database=test_${DB_NAME} --test-enable --test-tags ${TEST_TAGS} --init=${ADDONS_TO_TEST} --update=${ADDONS_TO_TEST} --without-demo= --workers=0 --dev= --stop-after-init
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'staging' ] ; then
|
if [ ${APP_ENV} = 'staging' ] ; then
|
||||||
# Automagically upgrade all addons and install new ones. Ideal for deployment process.
|
# Automagically upgrade all addons and install new ones. Ideal for deployment process.
|
||||||
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${SERVER_WIDE_MODULES} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --limit-time-cpu=3600 --limit-time-real=7200
|
echo odoo --config ${ODOO_RC} --database=${DB_NAME} --init=${INIT} --update=all --load=${SERVER_WIDE_MODULES} --log-level=${LOG_LEVEL} --load-language=${LOAD_LANGUAGE} --limit-time-cpu=3600 --limit-time-real=7200 --dev=
|
||||||
|
|
||||||
exec odoo --config ${ODOO_RC} --update=all --without-demo=all --workers=0 --limit-time-cpu=3600 --limit-time-real=7200
|
exec odoo --config ${ODOO_RC} --update=all --without-demo=all --workers=0 --limit-time-cpu=3600 --limit-time-real=7200 --dev=
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ${APP_ENV} = 'production' ] ; then
|
if [ ${APP_ENV} = 'production' ] ; then
|
||||||
@@ -63,7 +68,7 @@ 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
|
wait-for-psql.py --db_host ${HOST} --db_port ${PORT} --db_user ${USER} --db_password ${PASSWORD} --timeout=30
|
||||||
echo odoo --config ${ODOO_RC}
|
echo odoo --config ${ODOO_RC}
|
||||||
exec odoo --config ${ODOO_RC}
|
exec odoo --config ${ODOO_RC}
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -5,4 +5,10 @@
|
|||||||
<field name="key">report.url</field>
|
<field name="key">report.url</field>
|
||||||
<field name="value">http://127.0.0.1:8069</field>
|
<field name="value">http://127.0.0.1:8069</field>
|
||||||
</record>
|
</record>
|
||||||
|
|
||||||
|
<!-- When initializing Odoo with S3 storage. -->
|
||||||
|
<record id="ir_attachment_location" model="ir.config_parameter">
|
||||||
|
<field name="key">ir_attachment.location</field>
|
||||||
|
<field name="value">s3</field>
|
||||||
|
</record>
|
||||||
</odoo>
|
</odoo>
|
||||||
|
|||||||
34
odoo/fix-manifest.py
Normal file
34
odoo/fix-manifest.py
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
import sys
|
||||||
|
|
||||||
|
# Define the path to the manifest file
|
||||||
|
manifest_file_path = sys.argv[1]
|
||||||
|
|
||||||
|
# Read the file content
|
||||||
|
with open(manifest_file_path, 'r') as file:
|
||||||
|
lines = file.readlines()
|
||||||
|
|
||||||
|
# Find the start and end index of the manifest dictionary
|
||||||
|
start_index = next(i for i, line in enumerate(lines) if line.strip().startswith('{'))
|
||||||
|
end_index = next(i for i, line in enumerate(lines) if line.strip().endswith('}'))
|
||||||
|
|
||||||
|
# Construct and evaluate the manifest dictionary
|
||||||
|
manifest_dict = eval(''.join(lines[start_index:end_index + 1]))
|
||||||
|
|
||||||
|
# Modify the manifest dictionary
|
||||||
|
manifest_dict['installable'] = True
|
||||||
|
manifest_dict['auto_install'] = True
|
||||||
|
|
||||||
|
# Construct the modified manifest string
|
||||||
|
modified_manifest_lines = ['{\n']
|
||||||
|
for key, value in manifest_dict.items():
|
||||||
|
modified_manifest_lines.append(f" '{key}': {repr(value)},\n")
|
||||||
|
modified_manifest_lines.append('}\n')
|
||||||
|
|
||||||
|
# Replace the manifest dictionary string in the content
|
||||||
|
lines[start_index:end_index + 1] = modified_manifest_lines
|
||||||
|
|
||||||
|
# Write the modified content back to the file
|
||||||
|
with open(manifest_file_path, 'w') as file:
|
||||||
|
file.writelines(lines)
|
||||||
|
|
||||||
|
print(f"Modified {manifest_file_path}")
|
||||||
310
odoo/odoo.conf
Normal file
310
odoo/odoo.conf
Normal file
@@ -0,0 +1,310 @@
|
|||||||
|
[options]
|
||||||
|
;------------------------------------------;
|
||||||
|
; Options not exposed on the command line. ;
|
||||||
|
;------------------------------------------;
|
||||||
|
|
||||||
|
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 = ${ODOO_RC}
|
||||||
|
|
||||||
|
; --save
|
||||||
|
save = ${SAVE}
|
||||||
|
|
||||||
|
; --init | -i
|
||||||
|
init = ${INIT}
|
||||||
|
|
||||||
|
; --update | -u
|
||||||
|
update = ${UPDATE}
|
||||||
|
|
||||||
|
; --without-demo
|
||||||
|
demo = ${DEMO}
|
||||||
|
without_demo = ${WITHOUT_DEMO}
|
||||||
|
|
||||||
|
; --import-partial
|
||||||
|
import_partial = ${IMPORT_PARTIAL}
|
||||||
|
|
||||||
|
; --pidfile
|
||||||
|
pidfile = ${PIDFILE}
|
||||||
|
|
||||||
|
; --addons-path
|
||||||
|
addons_path = ${ADDONS_PATH}
|
||||||
|
|
||||||
|
; --upgrade-path
|
||||||
|
upgrade_path = ${UPGRADE_PATH}
|
||||||
|
|
||||||
|
; --load
|
||||||
|
server_wide_modules = ${SERVER_WIDE_MODULES}
|
||||||
|
|
||||||
|
; --data-dir
|
||||||
|
data_dir = ${DATA_DIR}
|
||||||
|
|
||||||
|
;------;
|
||||||
|
; HTTP ;
|
||||||
|
;------;
|
||||||
|
; --http-interface | --xmlrpc-interface
|
||||||
|
http_interface = ${HTTP_INTERFACE}
|
||||||
|
|
||||||
|
; --http-port | -p | --xmlrpc-port
|
||||||
|
http_port = ${HTTP_PORT}
|
||||||
|
|
||||||
|
; --xmlrpcs-interface
|
||||||
|
xmlrpcs_interface = ${XMLRPCS_INTERFACE}
|
||||||
|
|
||||||
|
; --xmlrpcs-port
|
||||||
|
xmlrpcs_port = ${XMLRPCS_PORT}
|
||||||
|
|
||||||
|
; --gevent-port | --longpolling_port (deprecated)
|
||||||
|
gevent_port = ${GEVENT_PORT}
|
||||||
|
|
||||||
|
; --no-http | --no-xmlrpc
|
||||||
|
http_enable = ${HTTP_ENABLE}
|
||||||
|
|
||||||
|
; --no-xmlrpcs
|
||||||
|
xmlrpcs = ${XMLRPCS}
|
||||||
|
|
||||||
|
; --proxy-mode
|
||||||
|
proxy_mode = ${PROXY_MODE}
|
||||||
|
|
||||||
|
; --x-sendfile
|
||||||
|
x_sendfile = ${X_SENDFILE}
|
||||||
|
|
||||||
|
;---------------;
|
||||||
|
; Testing Group ;
|
||||||
|
;---------------;
|
||||||
|
; --test-file
|
||||||
|
test_file = ${TEST_FILE}
|
||||||
|
|
||||||
|
; --test-enable
|
||||||
|
test_enable = ${TEST_ENABLE}
|
||||||
|
|
||||||
|
; --test-tags
|
||||||
|
test_tags = ${TEST_FILE}
|
||||||
|
|
||||||
|
; --screencasts
|
||||||
|
screencasts = ${SCREENCASTS}
|
||||||
|
|
||||||
|
; --screenshots
|
||||||
|
screenshots = ${SCREENSHOTS}
|
||||||
|
|
||||||
|
;---------------;
|
||||||
|
; Logging Group ;
|
||||||
|
;---------------;
|
||||||
|
; --logfile
|
||||||
|
logfile = ${LOGFILE}
|
||||||
|
|
||||||
|
; --syslog
|
||||||
|
syslog = ${SYSLOG}
|
||||||
|
|
||||||
|
; --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-level
|
||||||
|
log_db_level = ${LOG_DB_LEVEL}
|
||||||
|
|
||||||
|
; --log-level
|
||||||
|
log_level = ${LOG_LEVEL}
|
||||||
|
|
||||||
|
;------------;
|
||||||
|
; SMTP Group ;
|
||||||
|
;------------;
|
||||||
|
; --email-from
|
||||||
|
email_from = ${EMAIL_FROM}
|
||||||
|
|
||||||
|
; --from-filter
|
||||||
|
from_filter = ${FROM_FILTER}
|
||||||
|
|
||||||
|
; --smtp
|
||||||
|
smtp_server = ${SMTP_SERVER}
|
||||||
|
|
||||||
|
; --smtp-port
|
||||||
|
smtp_port = ${SMTP_PORT}
|
||||||
|
|
||||||
|
; --smtp-ssl
|
||||||
|
smtp_ssl = ${SMTP_SSL}
|
||||||
|
|
||||||
|
; --smtp-user
|
||||||
|
smtp_user = ${SMTP_USER}
|
||||||
|
|
||||||
|
; --smtp-password
|
||||||
|
smtp_password = ${SMTP_PASSWORD}
|
||||||
|
|
||||||
|
; --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}
|
||||||
|
|
||||||
|
;----------;
|
||||||
|
; DB Group ;
|
||||||
|
;----------;
|
||||||
|
; --database | -d
|
||||||
|
db_name = ${DB_NAME}
|
||||||
|
|
||||||
|
; --db_user | -r
|
||||||
|
db_user = ${DB_USER}
|
||||||
|
|
||||||
|
; --db_password | -w
|
||||||
|
db_password = ${DB_PASSWORD}
|
||||||
|
|
||||||
|
; --pg_path
|
||||||
|
pg_path = ${PG_PATH}
|
||||||
|
|
||||||
|
; --db_host
|
||||||
|
db_host = ${DB_HOST}
|
||||||
|
|
||||||
|
; --db_port
|
||||||
|
db_port = ${DB_PORT}
|
||||||
|
|
||||||
|
; --db_sslmode
|
||||||
|
db_sslmode = ${DB_SSLMODE}
|
||||||
|
|
||||||
|
; --db_maxconn
|
||||||
|
db_maxconn = ${DB_MAXCONN}
|
||||||
|
|
||||||
|
; --db-template
|
||||||
|
db_template = ${DB_TEMPLATE}
|
||||||
|
|
||||||
|
;------------------------------;
|
||||||
|
; Internationalisation options ;
|
||||||
|
;------------------------------;
|
||||||
|
; --load-language
|
||||||
|
load_language = ${LOAD_LANGUAGE}
|
||||||
|
|
||||||
|
; --language
|
||||||
|
language = ${LANGUAGE}
|
||||||
|
|
||||||
|
; --i18n-export
|
||||||
|
translate_out = ${TRANSLATE_OUT}
|
||||||
|
|
||||||
|
; --i18n-import
|
||||||
|
translate_in = ${TRANSLATE_IN}
|
||||||
|
|
||||||
|
; --i18n-overwrite
|
||||||
|
overwrite_existing_translations = ${OVERWRITE_EXISTING_TRANSLATIONS}
|
||||||
|
|
||||||
|
; --modules
|
||||||
|
translate_modules = ${TRANSLATE_MODULES}
|
||||||
|
|
||||||
|
;----------;
|
||||||
|
; Security ;
|
||||||
|
;----------;
|
||||||
|
; --no-database-list
|
||||||
|
list_db = ${LIST_DB}
|
||||||
|
|
||||||
|
;-----;
|
||||||
|
; WEB ;
|
||||||
|
;-----;
|
||||||
|
; --db-filter
|
||||||
|
dbfilter = ${DBFILTER}
|
||||||
|
|
||||||
|
;------------------;
|
||||||
|
; Advanced options ;
|
||||||
|
;------------------;
|
||||||
|
; --dev (all, reload, xml, qweb, werkzeug, sql, shell, assets, tests)
|
||||||
|
dev_mode = ${DEV_MODE}
|
||||||
|
|
||||||
|
; --shell-interface
|
||||||
|
shell_interface = ${SHELL_INTERFACE}
|
||||||
|
|
||||||
|
; --stop-after-init
|
||||||
|
stop_after_init = ${STOP_AFTER_INIT}
|
||||||
|
|
||||||
|
; --osv-memory-count-limit
|
||||||
|
osv_memory_count_limit = ${OSV_MEMORY_COUNT_LIMIT}
|
||||||
|
|
||||||
|
; --transient-age-limit | --osv-memory-age-limit (deprecated)
|
||||||
|
transient_age_limit = ${TRANSIENT_AGE_LIMIT}
|
||||||
|
|
||||||
|
; --max-cron-threads
|
||||||
|
max_cron_threads = ${MAX_CRON_THREADS}
|
||||||
|
|
||||||
|
; --unaccent
|
||||||
|
unaccent = ${UNACCENT}
|
||||||
|
|
||||||
|
; --geoip-db
|
||||||
|
geoip_database = ${GEOIP_DATABASE}
|
||||||
|
|
||||||
|
; --workers
|
||||||
|
workers = ${WORKERS}
|
||||||
|
|
||||||
|
; --limit-memory-soft
|
||||||
|
limit_memory_soft = ${LIMIT_MEMORY_SOFT}
|
||||||
|
|
||||||
|
; --limit-memory-hard
|
||||||
|
limit_memory_hard = ${LIMIT_MEMORY_HARD}
|
||||||
|
|
||||||
|
; --limit-time-cpu
|
||||||
|
limit_time_cpu = ${LIMIT_TIME_CPU}
|
||||||
|
|
||||||
|
; --limit-time-real
|
||||||
|
limit_time_real = ${LIMIT_TIME_REAL}
|
||||||
|
|
||||||
|
; --limit-time-real-cron
|
||||||
|
limit_time_real_cron = ${LIMIT_TIME_REAL_CRON}
|
||||||
|
|
||||||
|
; --limit-request
|
||||||
|
limit_request = ${LIMIT_REQUEST}
|
||||||
|
|
||||||
|
;-----------------------------;
|
||||||
|
; External Integrations ;
|
||||||
|
;-----------------------------;
|
||||||
|
|
||||||
|
;-------------;
|
||||||
|
; Redis ;
|
||||||
|
;-------------;
|
||||||
|
; -- Possible values: 1 or true
|
||||||
|
ODOO_SESSION_REDIS = ${ODOO_SESSION_REDIS}
|
||||||
|
|
||||||
|
; -- Defaults to is localhost
|
||||||
|
ODOO_SESSION_REDIS_HOST = ${ODOO_SESSION_REDIS_HOST}
|
||||||
|
|
||||||
|
; -- Defaults to 6379
|
||||||
|
ODOO_SESSION_REDIS_PORT = ${ODOO_SESSION_REDIS_PORT}
|
||||||
|
|
||||||
|
; -- Sets the password for the AUTH command (optional)
|
||||||
|
ODOO_SESSION_REDIS_PASSWORD = ${ODOO_SESSION_REDIS_PASSWORD}
|
||||||
|
|
||||||
|
; -- Alternative way to define the Redis server address like rediss:// protocol.
|
||||||
|
ODOO_SESSION_REDIS_URL = ${ODOO_SESSION_REDIS_URL}
|
||||||
|
|
||||||
|
; -- Prefix for the session keys (optional)
|
||||||
|
ODOO_SESSION_REDIS_PREFIX = ${ODOO_SESSION_REDIS_PREFIX}
|
||||||
|
|
||||||
|
; -- Time in seconds before expiration of the sessions (default is 7 days)
|
||||||
|
ODOO_SESSION_REDIS_EXPIRATION = ${ODOO_SESSION_REDIS_EXPIRATION}
|
||||||
|
|
||||||
|
; -- Time in seconds before expiration of the anonymous sessions (default is 3 hours)
|
||||||
|
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = ${ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS}
|
||||||
|
|
||||||
|
;----------;
|
||||||
|
; S3 ;
|
||||||
|
;----------;
|
||||||
|
; -- Disable S3 storage
|
||||||
|
DISABLE_ATTACHMENT_STORAGE = ${DISABLE_ATTACHMENT_STORAGE}
|
||||||
|
|
||||||
|
; -- Not required if using AWS S3
|
||||||
|
AWS_HOST = ${AWS_HOST}
|
||||||
|
|
||||||
|
; -- Required if using AWS services
|
||||||
|
AWS_REGION = ${AWS_REGION}
|
||||||
|
|
||||||
|
; -- AWS Authentication
|
||||||
|
AWS_ACCESS_KEY_ID = ${AWS_ACCESS_KEY_ID}
|
||||||
|
AWS_SECRET_ACCESS_KEY = ${AWS_SECRET_ACCESS_KEY}
|
||||||
|
|
||||||
|
; Optional db_name placeholder
|
||||||
|
AWS_BUCKETNAME = ${AWS_BUCKETNAME}
|
||||||
@@ -1,291 +0,0 @@
|
|||||||
options]
|
|
||||||
;------------------------------------------;
|
|
||||||
; Options not exposed on the command line. ;
|
|
||||||
;------------------------------------------;
|
|
||||||
|
|
||||||
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 = {ODOO_RC}
|
|
||||||
|
|
||||||
; --save
|
|
||||||
save = {SAVE}
|
|
||||||
|
|
||||||
; --init | -i
|
|
||||||
init = {INIT}
|
|
||||||
|
|
||||||
; --update | -u
|
|
||||||
update = {UPDATE}
|
|
||||||
|
|
||||||
; --without-demo
|
|
||||||
demo = {DEMO}
|
|
||||||
without_demo = {WITHOUT_DEMO}
|
|
||||||
|
|
||||||
; --import-partial
|
|
||||||
import_partial = {IMPORT_PARTIAL}
|
|
||||||
|
|
||||||
; --pidfile
|
|
||||||
pidfile = {PIDFILE}
|
|
||||||
|
|
||||||
; --addons-path
|
|
||||||
addons_path = {ADDONS_PATH}
|
|
||||||
|
|
||||||
; --upgrade-path
|
|
||||||
upgrade_path = {UPGRADE_PATH}
|
|
||||||
|
|
||||||
; --load
|
|
||||||
server_wide_modules = {SERVER_WIDE_MODULES}
|
|
||||||
|
|
||||||
; --data-dir
|
|
||||||
data_dir = {DATA_DIR}
|
|
||||||
|
|
||||||
;------;
|
|
||||||
; HTTP ;
|
|
||||||
;------;
|
|
||||||
; --http-interface | --xmlrpc-interface
|
|
||||||
http_interface = {HTTP_INTERFACE}
|
|
||||||
|
|
||||||
; --http-port | -p | --xmlrpc-port
|
|
||||||
http_port = {HTTP_PORT}
|
|
||||||
|
|
||||||
; --xmlrpcs-interface
|
|
||||||
xmlrpcs_interface = {XMLRPCS_INTERFACE}
|
|
||||||
|
|
||||||
; --xmlrpcs-port
|
|
||||||
xmlrpcs_port = {XMLRPCS_PORT}
|
|
||||||
|
|
||||||
; --gevent-port | --longpolling_port (deprecated)
|
|
||||||
gevent_port = {GEVENT_PORT}
|
|
||||||
|
|
||||||
; --no-http | --no-xmlrpc
|
|
||||||
http_enable = {HTTP_ENABLE}
|
|
||||||
|
|
||||||
; --no-xmlrpcs
|
|
||||||
xmlrpcs = {XMLRPCS}
|
|
||||||
|
|
||||||
; --proxy-mode
|
|
||||||
proxy_mode = {PROXY_MODE}
|
|
||||||
|
|
||||||
; --x-sendfile
|
|
||||||
x_sendfile = {X_SENDFILE}
|
|
||||||
|
|
||||||
;---------------;
|
|
||||||
; Testing Group ;
|
|
||||||
;---------------;
|
|
||||||
; --test-file
|
|
||||||
test_file = {TEST_FILE}
|
|
||||||
|
|
||||||
; --test-enable
|
|
||||||
test_enable = {TEST_ENABLE}
|
|
||||||
|
|
||||||
; --test-tags
|
|
||||||
test_tags = {TEST_FILE}
|
|
||||||
|
|
||||||
; --screencasts
|
|
||||||
screencasts = {SCREENCASTS}
|
|
||||||
|
|
||||||
; --screenshots
|
|
||||||
screenshots = {SCREENSHOTS}
|
|
||||||
|
|
||||||
;---------------;
|
|
||||||
; Logging Group ;
|
|
||||||
;---------------;
|
|
||||||
; --logfile
|
|
||||||
logfile = {LOGFILE}
|
|
||||||
|
|
||||||
; --syslog
|
|
||||||
syslog = {SYSLOG}
|
|
||||||
|
|
||||||
; --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-level
|
|
||||||
log_db_level = {LOG_DB_LEVEL}
|
|
||||||
|
|
||||||
; --log-level
|
|
||||||
log_level = {LOG_LEVEL}
|
|
||||||
|
|
||||||
;------------;
|
|
||||||
; SMTP Group ;
|
|
||||||
;------------;
|
|
||||||
; --email-from
|
|
||||||
email_from = {EMAIL_FROM}
|
|
||||||
|
|
||||||
; --from-filter
|
|
||||||
from_filter = {FROM_FILTER}
|
|
||||||
|
|
||||||
; --smtp
|
|
||||||
smtp_server = {SMTP_SERVER}
|
|
||||||
|
|
||||||
; --smtp-port
|
|
||||||
smtp_port = {SMTP_PORT}
|
|
||||||
|
|
||||||
; --smtp-ssl
|
|
||||||
smtp_ssl = {SMTP_SSL}
|
|
||||||
|
|
||||||
; --smtp-user
|
|
||||||
smtp_user = {SMTP_USER}
|
|
||||||
|
|
||||||
; --smtp-password
|
|
||||||
smtp_password = {SMTP_PASSWORD}
|
|
||||||
|
|
||||||
; --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}
|
|
||||||
|
|
||||||
;----------;
|
|
||||||
; DB Group ;
|
|
||||||
;----------;
|
|
||||||
; --database | -d
|
|
||||||
db_name = {DB_NAME}
|
|
||||||
|
|
||||||
; --db_user | -r
|
|
||||||
db_user = {DB_USER}
|
|
||||||
|
|
||||||
; --db_password | -w
|
|
||||||
db_password = {DB_PASSWORD}
|
|
||||||
|
|
||||||
; --pg_path
|
|
||||||
pg_path = {PG_PATH}
|
|
||||||
|
|
||||||
; --db_host
|
|
||||||
db_host = {DB_HOST}
|
|
||||||
|
|
||||||
; --db_port
|
|
||||||
db_port = {DB_PORT}
|
|
||||||
|
|
||||||
; --db_sslmode
|
|
||||||
db_sslmode = {DB_SSLMODE}
|
|
||||||
|
|
||||||
; --db_maxconn
|
|
||||||
db_maxconn = {DB_MAXCONN}
|
|
||||||
|
|
||||||
; --db-template
|
|
||||||
db_template = {DB_TEMPLATE}
|
|
||||||
|
|
||||||
;------------------------------;
|
|
||||||
; Internationalisation options ;
|
|
||||||
;------------------------------;
|
|
||||||
; --load-language
|
|
||||||
load_language = {LOAD_LANGUAGE}
|
|
||||||
|
|
||||||
; --language
|
|
||||||
language = {LANGUAGE}
|
|
||||||
|
|
||||||
; --i18n-export
|
|
||||||
translate_out = {TRANSLATE_OUT}
|
|
||||||
|
|
||||||
; --i18n-import
|
|
||||||
translate_in = {TRANSLATE_IN}
|
|
||||||
|
|
||||||
; --i18n-overwrite
|
|
||||||
overwrite_existing_translations = {OVERWRITE_EXISTING_TRANSLATIONS}
|
|
||||||
|
|
||||||
; --modules
|
|
||||||
translate_modules = {TRANSLATE_MODULES}
|
|
||||||
|
|
||||||
;----------;
|
|
||||||
; Security ;
|
|
||||||
;----------;
|
|
||||||
; --no-database-list
|
|
||||||
list_db = {LIST_DB}
|
|
||||||
|
|
||||||
;-----;
|
|
||||||
; WEB ;
|
|
||||||
;-----;
|
|
||||||
; --db-filter
|
|
||||||
dbfilter = {DBFILTER}
|
|
||||||
|
|
||||||
;------------------;
|
|
||||||
; Advanced options ;
|
|
||||||
;------------------;
|
|
||||||
; --dev (all, reload, xml, qweb, werkzeug, sql, shell, assets, tests)
|
|
||||||
dev_mode = {DEV_MODE}
|
|
||||||
|
|
||||||
; --shell-interface
|
|
||||||
shell_interface = {SHELL_INTERFACE}
|
|
||||||
|
|
||||||
; --stop-after-init
|
|
||||||
stop_after_init = {STOP_AFTER_INIT}
|
|
||||||
|
|
||||||
; --osv-memory-count-limit
|
|
||||||
osv_memory_count_limit = {OSV_MEMORY_COUNT_LIMIT}
|
|
||||||
|
|
||||||
; --transient-age-limit | --osv-memory-age-limit (deprecated)
|
|
||||||
transient_age_limit = {TRANSIENT_AGE_LIMIT}
|
|
||||||
|
|
||||||
; --max-cron-threads
|
|
||||||
max_cron_threads = {MAX_CRON_THREADS}
|
|
||||||
|
|
||||||
; --unaccent
|
|
||||||
unaccent = {UNACCENT}
|
|
||||||
|
|
||||||
; --geoip-db
|
|
||||||
geoip_database = {GEOIP_DATABASE}
|
|
||||||
|
|
||||||
; --workers
|
|
||||||
workers = {WORKERS}
|
|
||||||
|
|
||||||
; --limit-memory-soft
|
|
||||||
limit_memory_soft = {LIMIT_MEMORY_SOFT}
|
|
||||||
|
|
||||||
; --limit-memory-hard
|
|
||||||
limit_memory_hard = {LIMIT_MEMORY_HARD}
|
|
||||||
|
|
||||||
; --limit-time-cpu
|
|
||||||
limit_time_cpu = {LIMIT_TIME_CPU}
|
|
||||||
|
|
||||||
; --limit-time-real
|
|
||||||
limit_time_real = {LIMIT_TIME_REAL}
|
|
||||||
|
|
||||||
; --limit-time-real-cron
|
|
||||||
limit_time_real_cron = {LIMIT_TIME_REAL_CRON}
|
|
||||||
|
|
||||||
; --limit-request
|
|
||||||
limit_request = {LIMIT_REQUEST}
|
|
||||||
|
|
||||||
;-----------------------------;
|
|
||||||
; External Integrations ;
|
|
||||||
;-----------------------------;
|
|
||||||
|
|
||||||
;-------------;
|
|
||||||
; Redis ;
|
|
||||||
;-------------;
|
|
||||||
; -- Possible values: 1 or true
|
|
||||||
ODOO_SESSION_REDIS = {ODOO_SESSION_REDIS}
|
|
||||||
|
|
||||||
; -- Defaults to is localhost
|
|
||||||
ODOO_SESSION_REDIS_HOST = {ODOO_SESSION_REDIS_HOST}
|
|
||||||
|
|
||||||
; -- Defaults to 6379
|
|
||||||
ODOO_SESSION_REDIS_PORT = {ODOO_SESSION_REDIS_PORT}
|
|
||||||
|
|
||||||
; -- Sets the password for the AUTH command (optional)
|
|
||||||
ODOO_SESSION_REDIS_PASSWORD = {ODOO_SESSION_REDIS_PASSWORD}
|
|
||||||
|
|
||||||
; -- Alternative way to define the Redis server address like rediss:// protocol.
|
|
||||||
ODOO_SESSION_REDIS_URL = {ODOO_SESSION_REDIS_URL}
|
|
||||||
|
|
||||||
; -- Prefix for the session keys (optional)
|
|
||||||
ODOO_SESSION_REDIS_PREFIX = {ODOO_SESSION_REDIS_PREFIX}
|
|
||||||
|
|
||||||
; -- Time in seconds before expiration of the sessions (default is 7 days)
|
|
||||||
ODOO_SESSION_REDIS_EXPIRATION = {ODOO_SESSION_REDIS_EXPIRATION}
|
|
||||||
|
|
||||||
; -- Time in seconds before expiration of the anonymous sessions (default is 3 hours)
|
|
||||||
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = {ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS}
|
|
||||||
432
odoo/odoorc.sh
432
odoo/odoorc.sh
@@ -2,419 +2,39 @@
|
|||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# Define default values for environment variables
|
# Define the path to the example configuration file
|
||||||
set -a
|
TEMPLATE_CONF="odoo.conf"
|
||||||
source /.env
|
|
||||||
set +a
|
|
||||||
|
|
||||||
declare -A defaults
|
# Copy the example conf to the destination to start replacing the variables
|
||||||
defaults=(
|
cp "$TEMPLATE_CONF" "$ODOO_RC"
|
||||||
[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}
|
|
||||||
|
|
||||||
[ODOO_RC]=${ODOO_RC}
|
# First pass: Evaluate any nested variables within .env file and export them
|
||||||
[SAVE]=${SAVE}
|
while IFS='=' read -r key value || [[ -n $key ]]; do
|
||||||
[INIT]=${INIT}
|
# Skip comments and empty lines
|
||||||
[UPDATE]=${UPDATE}
|
[[ $key =~ ^#.* ]] || [[ -z $key ]] && continue
|
||||||
[DEMO]=${DEMO}
|
|
||||||
[WITHOUT_DEMO]=${WITHOUT_DEMO}
|
|
||||||
[IMPORT_PARTIAL]=${IMPORT_PARTIAL}
|
|
||||||
[PIDFILE]=${PIDFILE}
|
|
||||||
[ADDONS_PATH]=${ADDONS_PATH}
|
|
||||||
[UPGRADE_PATH]=${UPGRADE_PATH}
|
|
||||||
[SERVER_WIDE_MODULES]=${SERVER_WIDE_MODULES}
|
|
||||||
[DATA_DIR]=${DATA_DIR}
|
|
||||||
|
|
||||||
[HTTP_INTERFACE]=${HTTP_INTERFACE}
|
# Removing any quotes around the value
|
||||||
[HTTP_PORT]=${HTTP_PORT}
|
value=${value%\"}
|
||||||
[XMLRPCS_INTERFACE]=${XMLRPCS_INTERFACE}
|
value=${value#\"}
|
||||||
[XMLRPCS_PORT]=${XMLRPCS_PORT}
|
|
||||||
[GEVENT_PORT]=${GEVENT_PORT}
|
|
||||||
[HTTP_ENABLE]=${HTTP_ENABLE}
|
|
||||||
[XMLRPCS]=${XMLRPCS}
|
|
||||||
[PROXY_MODE]=${PROXY_MODE}
|
|
||||||
[X_SENDFILE]=${X_SENDFILE}
|
|
||||||
|
|
||||||
[DBFILTER]=${DBFILTER}
|
# Evaluate any variables within value
|
||||||
|
eval "value=\"$value\""
|
||||||
|
|
||||||
[TEST_FILE]=${TEST_FILE}
|
export "$key=$value"
|
||||||
[TEST_ENABLE]=${TEST_ENABLE}
|
done < .env
|
||||||
[TEST_TAGS]=${TEST_TAGS}
|
|
||||||
[SCREENCASTS]=${SCREENCASTS}
|
|
||||||
[SCREENSHOTS]=${SCREENSHOTS}
|
|
||||||
|
|
||||||
[LOGFILE]=${LOGFILE}
|
# Second pass: Replace the variables in $ODOO_RC
|
||||||
[SYSLOG]=${SYSLOG}
|
while IFS='=' read -r key value || [[ -n $key ]]; do
|
||||||
[LOG_HANDLER]=${LOG_HANDLER}
|
# Skip comments and empty lines
|
||||||
[LOG_DB]=${LOG_DB}
|
[[ $key =~ ^#.* ]] || [[ -z $key ]] && continue
|
||||||
[LOG_DB_LEVEL]=${LOG_DB_LEVEL}
|
|
||||||
[LOG_LEVEL]=${LOG_LEVEL}
|
|
||||||
|
|
||||||
[EMAIL_FROM]=${EMAIL_FROM}
|
value=${!key} # Get the value of the variable whose name is $key
|
||||||
[FROM_FILTER]=${FROM_FILTER}
|
|
||||||
[SMTP_SERVER]=${SMTP_SERVER}
|
|
||||||
[SMTP_PORT]=${SMTP_PORT}
|
|
||||||
[SMTP_SSL]=${SMTP_SSL}
|
|
||||||
[SMTP_USER]=${SMTP_USER}
|
|
||||||
[SMTP_PASSWORD]=${SMTP_PASSWORD}
|
|
||||||
[SMTP_SSL_CERTIFICATE_FILENAME]=${SMTP_SSL_CERTIFICATE_FILENAME}
|
|
||||||
[SMTP_SSL_PRIVATE_KEY_FILENAME]=${SMTP_SSL_PRIVATE_KEY_FILENAME}
|
|
||||||
|
|
||||||
[DB_NAME]=${DB_NAME}
|
# Escape characters which are special to sed
|
||||||
[DB_USER]=${DB_USER}
|
value_escaped=$(echo "$value" | sed 's/[\/&]/\\&/g')
|
||||||
[DB_PASSWORD]=${DB_PASSWORD}
|
|
||||||
[PG_PATH]=${PG_PATH}
|
|
||||||
[DB_HOST]=${DB_HOST}
|
|
||||||
[DB_PORT]=${DB_PORT}
|
|
||||||
[DB_SSLMODE]=${DB_SSLMODE}
|
|
||||||
[DB_MAXCONN]=${DB_MAXCONN}
|
|
||||||
[DB_TEMPLATE]=${DB_TEMPLATE}
|
|
||||||
|
|
||||||
[LOAD_LANGUAGE]=${LOAD_LANGUAGE}
|
# Replace occurrences of the key with the value in $ODOO_RC
|
||||||
[LANGUAGE]=${LANGUAGE}
|
sed -i "s/\${$key}/${value_escaped}/g" "$ODOO_RC"
|
||||||
[TRANSLATE_OUT]=${TRANSLATE_OUT}
|
done < .env
|
||||||
[TRANSLATE_IN]=${TRANSLATE_IN}
|
|
||||||
[OVERWRITE_EXISTING_TRANSLATIONS]=${OVERWRITE_EXISTING_TRANSLATIONS}
|
|
||||||
[TRANSLATE_MODULES]=${TRANSLATE_MODULES}
|
|
||||||
|
|
||||||
[LIST_DB]=${LIST_DB}
|
echo "Configuration file is generated at $ODOO_RC"
|
||||||
|
|
||||||
[DEV_MODE]=${DEV_MODE}
|
|
||||||
[SHELL_INTERFACE]=${SHELL_INTERFACE}
|
|
||||||
[STOP_AFTER_INIT]=${STOP_AFTER_INIT}
|
|
||||||
[OSV_MEMORY_COUNT_LIMIT]=${OSV_MEMORY_COUNT_LIMIT}
|
|
||||||
[TRANSIENT_AGE_LIMIT]=${TRANSIENT_AGE_LIMIT}
|
|
||||||
[MAX_CRON_THREADS]=${MAX_CRON_THREADS}
|
|
||||||
[UNACCENT]=${UNACCENT}
|
|
||||||
[GEOIP_DATABASE]=${GEOIP_DATABASE}
|
|
||||||
[WORKERS]=${WORKERS}
|
|
||||||
[LIMIT_MEMORY_SOFT]=${LIMIT_MEMORY_SOFT}
|
|
||||||
[LIMIT_MEMORY_HARD]=${LIMIT_MEMORY_HARD}
|
|
||||||
[LIMIT_TIME_CPU]=${LIMIT_TIME_CPU}
|
|
||||||
[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}
|
|
||||||
)
|
|
||||||
|
|
||||||
# Define the template
|
|
||||||
template=$(cat << EOF
|
|
||||||
[options]
|
|
||||||
;------------------------------------------;
|
|
||||||
; Options not exposed on the command line. ;
|
|
||||||
;------------------------------------------;
|
|
||||||
|
|
||||||
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 = {ODOO_RC}
|
|
||||||
|
|
||||||
; --save
|
|
||||||
save = {SAVE}
|
|
||||||
|
|
||||||
; --init | -i
|
|
||||||
init = {INIT}
|
|
||||||
|
|
||||||
; --update | -u
|
|
||||||
update = {UPDATE}
|
|
||||||
|
|
||||||
; --without-demo
|
|
||||||
demo = {DEMO}
|
|
||||||
without_demo = {WITHOUT_DEMO}
|
|
||||||
|
|
||||||
; --import-partial
|
|
||||||
import_partial = {IMPORT_PARTIAL}
|
|
||||||
|
|
||||||
; --pidfile
|
|
||||||
pidfile = {PIDFILE}
|
|
||||||
|
|
||||||
; --addons-path
|
|
||||||
addons_path = {ADDONS_PATH}
|
|
||||||
|
|
||||||
; --upgrade-path
|
|
||||||
upgrade_path = {UPGRADE_PATH}
|
|
||||||
|
|
||||||
; --load
|
|
||||||
server_wide_modules = {SERVER_WIDE_MODULES}
|
|
||||||
|
|
||||||
; --data-dir
|
|
||||||
data_dir = {DATA_DIR}
|
|
||||||
|
|
||||||
;------;
|
|
||||||
; HTTP ;
|
|
||||||
;------;
|
|
||||||
; --http-interface | --xmlrpc-interface
|
|
||||||
http_interface = {HTTP_INTERFACE}
|
|
||||||
|
|
||||||
; --http-port | -p | --xmlrpc-port
|
|
||||||
http_port = {HTTP_PORT}
|
|
||||||
|
|
||||||
; --xmlrpcs-interface
|
|
||||||
xmlrpcs_interface = {XMLRPCS_INTERFACE}
|
|
||||||
|
|
||||||
; --xmlrpcs-port
|
|
||||||
xmlrpcs_port = {XMLRPCS_PORT}
|
|
||||||
|
|
||||||
; --gevent-port | --longpolling_port (deprecated)
|
|
||||||
gevent_port = {GEVENT_PORT}
|
|
||||||
|
|
||||||
; --no-http | --no-xmlrpc
|
|
||||||
http_enable = {HTTP_ENABLE}
|
|
||||||
|
|
||||||
; --no-xmlrpcs
|
|
||||||
xmlrpcs = {XMLRPCS}
|
|
||||||
|
|
||||||
; --proxy-mode
|
|
||||||
proxy_mode = {PROXY_MODE}
|
|
||||||
|
|
||||||
; --x-sendfile
|
|
||||||
x_sendfile = {X_SENDFILE}
|
|
||||||
|
|
||||||
;---------------;
|
|
||||||
; Testing Group ;
|
|
||||||
;---------------;
|
|
||||||
; --test-file
|
|
||||||
test_file = {TEST_FILE}
|
|
||||||
|
|
||||||
; --test-enable
|
|
||||||
test_enable = {TEST_ENABLE}
|
|
||||||
|
|
||||||
; --test-tags
|
|
||||||
test_tags = {TEST_FILE}
|
|
||||||
|
|
||||||
; --screencasts
|
|
||||||
screencasts = {SCREENCASTS}
|
|
||||||
|
|
||||||
; --screenshots
|
|
||||||
screenshots = {SCREENSHOTS}
|
|
||||||
|
|
||||||
;---------------;
|
|
||||||
; Logging Group ;
|
|
||||||
;---------------;
|
|
||||||
; --logfile
|
|
||||||
logfile = {LOGFILE}
|
|
||||||
|
|
||||||
; --syslog
|
|
||||||
syslog = {SYSLOG}
|
|
||||||
|
|
||||||
; --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-level
|
|
||||||
log_db_level = {LOG_DB_LEVEL}
|
|
||||||
|
|
||||||
; --log-level
|
|
||||||
log_level = {LOG_LEVEL}
|
|
||||||
|
|
||||||
;------------;
|
|
||||||
; SMTP Group ;
|
|
||||||
;------------;
|
|
||||||
; --email-from
|
|
||||||
email_from = {EMAIL_FROM}
|
|
||||||
|
|
||||||
; --from-filter
|
|
||||||
from_filter = {FROM_FILTER}
|
|
||||||
|
|
||||||
; --smtp
|
|
||||||
smtp_server = {SMTP_SERVER}
|
|
||||||
|
|
||||||
; --smtp-port
|
|
||||||
smtp_port = {SMTP_PORT}
|
|
||||||
|
|
||||||
; --smtp-ssl
|
|
||||||
smtp_ssl = {SMTP_SSL}
|
|
||||||
|
|
||||||
; --smtp-user
|
|
||||||
smtp_user = {SMTP_USER}
|
|
||||||
|
|
||||||
; --smtp-password
|
|
||||||
smtp_password = {SMTP_PASSWORD}
|
|
||||||
|
|
||||||
; --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}
|
|
||||||
|
|
||||||
;----------;
|
|
||||||
; DB Group ;
|
|
||||||
;----------;
|
|
||||||
; --database | -d
|
|
||||||
db_name = {DB_NAME}
|
|
||||||
|
|
||||||
; --db_user | -r
|
|
||||||
db_user = {DB_USER}
|
|
||||||
|
|
||||||
; --db_password | -w
|
|
||||||
db_password = {DB_PASSWORD}
|
|
||||||
|
|
||||||
; --pg_path
|
|
||||||
pg_path = {PG_PATH}
|
|
||||||
|
|
||||||
; --db_host
|
|
||||||
db_host = {DB_HOST}
|
|
||||||
|
|
||||||
; --db_port
|
|
||||||
db_port = {DB_PORT}
|
|
||||||
|
|
||||||
; --db_sslmode
|
|
||||||
db_sslmode = {DB_SSLMODE}
|
|
||||||
|
|
||||||
; --db_maxconn
|
|
||||||
db_maxconn = {DB_MAXCONN}
|
|
||||||
|
|
||||||
; --db-template
|
|
||||||
db_template = {DB_TEMPLATE}
|
|
||||||
|
|
||||||
;------------------------------;
|
|
||||||
; Internationalisation options ;
|
|
||||||
;------------------------------;
|
|
||||||
; --load-language
|
|
||||||
load_language = {LOAD_LANGUAGE}
|
|
||||||
|
|
||||||
; --language
|
|
||||||
language = {LANGUAGE}
|
|
||||||
|
|
||||||
; --i18n-export
|
|
||||||
translate_out = {TRANSLATE_OUT}
|
|
||||||
|
|
||||||
; --i18n-import
|
|
||||||
translate_in = {TRANSLATE_IN}
|
|
||||||
|
|
||||||
; --i18n-overwrite
|
|
||||||
overwrite_existing_translations = {OVERWRITE_EXISTING_TRANSLATIONS}
|
|
||||||
|
|
||||||
; --modules
|
|
||||||
translate_modules = {TRANSLATE_MODULES}
|
|
||||||
|
|
||||||
;----------;
|
|
||||||
; Security ;
|
|
||||||
;----------;
|
|
||||||
; --no-database-list
|
|
||||||
list_db = {LIST_DB}
|
|
||||||
|
|
||||||
;-----;
|
|
||||||
; WEB ;
|
|
||||||
;-----;
|
|
||||||
; --db-filter
|
|
||||||
dbfilter = {DBFILTER}
|
|
||||||
|
|
||||||
;------------------;
|
|
||||||
; Advanced options ;
|
|
||||||
;------------------;
|
|
||||||
; --dev (all, reload, xml, qweb, werkzeug, sql, shell, assets, tests)
|
|
||||||
dev_mode = {DEV_MODE}
|
|
||||||
|
|
||||||
; --shell-interface
|
|
||||||
shell_interface = {SHELL_INTERFACE}
|
|
||||||
|
|
||||||
; --stop-after-init
|
|
||||||
stop_after_init = {STOP_AFTER_INIT}
|
|
||||||
|
|
||||||
; --osv-memory-count-limit
|
|
||||||
osv_memory_count_limit = {OSV_MEMORY_COUNT_LIMIT}
|
|
||||||
|
|
||||||
; --transient-age-limit | --osv-memory-age-limit (deprecated)
|
|
||||||
transient_age_limit = {TRANSIENT_AGE_LIMIT}
|
|
||||||
|
|
||||||
; --max-cron-threads
|
|
||||||
max_cron_threads = {MAX_CRON_THREADS}
|
|
||||||
|
|
||||||
; --unaccent
|
|
||||||
unaccent = {UNACCENT}
|
|
||||||
|
|
||||||
; --geoip-db
|
|
||||||
geoip_database = {GEOIP_DATABASE}
|
|
||||||
|
|
||||||
; --workers
|
|
||||||
workers = {WORKERS}
|
|
||||||
|
|
||||||
; --limit-memory-soft
|
|
||||||
limit_memory_soft = {LIMIT_MEMORY_SOFT}
|
|
||||||
|
|
||||||
; --limit-memory-hard
|
|
||||||
limit_memory_hard = {LIMIT_MEMORY_HARD}
|
|
||||||
|
|
||||||
; --limit-time-cpu
|
|
||||||
limit_time_cpu = {LIMIT_TIME_CPU}
|
|
||||||
|
|
||||||
; --limit-time-real
|
|
||||||
limit_time_real = {LIMIT_TIME_REAL}
|
|
||||||
|
|
||||||
; --limit-time-real-cron
|
|
||||||
limit_time_real_cron = {LIMIT_TIME_REAL_CRON}
|
|
||||||
|
|
||||||
; --limit-request
|
|
||||||
limit_request = {LIMIT_REQUEST}
|
|
||||||
|
|
||||||
;-----------------------------;
|
|
||||||
; External Integrations ;
|
|
||||||
;-----------------------------;
|
|
||||||
|
|
||||||
;-------------;
|
|
||||||
; Redis ;
|
|
||||||
;-------------;
|
|
||||||
; -- Possible values: 1 or true
|
|
||||||
ODOO_SESSION_REDIS = {ODOO_SESSION_REDIS}
|
|
||||||
|
|
||||||
; -- Defaults to is localhost
|
|
||||||
ODOO_SESSION_REDIS_HOST = {ODOO_SESSION_REDIS_HOST}
|
|
||||||
|
|
||||||
; -- Defaults to 6379
|
|
||||||
ODOO_SESSION_REDIS_PORT = {ODOO_SESSION_REDIS_PORT}
|
|
||||||
|
|
||||||
; -- Sets the password for the AUTH command (optional)
|
|
||||||
ODOO_SESSION_REDIS_PASSWORD = {ODOO_SESSION_REDIS_PASSWORD}
|
|
||||||
|
|
||||||
; -- Alternative way to define the Redis server address like rediss:// protocol.
|
|
||||||
ODOO_SESSION_REDIS_URL = {ODOO_SESSION_REDIS_URL}
|
|
||||||
|
|
||||||
; -- Prefix for the session keys (optional)
|
|
||||||
ODOO_SESSION_REDIS_PREFIX = {ODOO_SESSION_REDIS_PREFIX}
|
|
||||||
|
|
||||||
; -- Time in seconds before expiration of the sessions (default is 7 days)
|
|
||||||
ODOO_SESSION_REDIS_EXPIRATION = {ODOO_SESSION_REDIS_EXPIRATION}
|
|
||||||
|
|
||||||
; -- Time in seconds before expiration of the anonymous sessions (default is 3 hours)
|
|
||||||
ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS = {ODOO_SESSION_REDIS_EXPIRATION_ANONYMOUS}
|
|
||||||
|
|
||||||
EOF
|
|
||||||
)
|
|
||||||
|
|
||||||
# Override defaults with values from environment variables
|
|
||||||
for key in "${!defaults[@]}"; do
|
|
||||||
if [[ ! ${defaults[$key]} =~ ^\{.*\}$ ]]; then
|
|
||||||
value=${!key:-${defaults[$key]}}
|
|
||||||
template="${template//\{$key\}/$value}"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Store the result to the odoo.conf file
|
|
||||||
echo "$template" > ${ODOO_RC}
|
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
debugpy
|
debugpy
|
||||||
websocket-client
|
websocket-client
|
||||||
redis
|
redis
|
||||||
|
boto3
|
||||||
|
|||||||
@@ -1,2 +1,20 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Check if the repository directory exists
|
||||||
|
if [ ! -d "odoo-cloud-platform" ]; then
|
||||||
git clone https://github.com/camptocamp/odoo-cloud-platform.git --depth 1 --branch ${ODOO_TAG} --single-branch --no-tags;
|
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
|
cp -r odoo-cloud-platform/session_redis ${THIRD_PARTY_ADDONS}/session_redis
|
||||||
|
cp -r odoo-cloud-platform/base_attachment_object_storage ${THIRD_PARTY_ADDONS}/base_attachment_object_storage
|
||||||
|
cp -r odoo-cloud-platform/attachment_s3 ${THIRD_PARTY_ADDONS}/attachment_s3
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Define the path to the manifest file
|
||||||
|
redis_manifest="${THIRD_PARTY_ADDONS}/session_redis/__manifest__.py"
|
||||||
|
# Define the path to the manifest file
|
||||||
|
s3_manifest="${THIRD_PARTY_ADDONS}/attachment_s3/__manifest__.py"
|
||||||
|
|
||||||
|
# Modify the manifest file
|
||||||
|
python3 /fix-manifest.py $redis_manifest
|
||||||
|
python3 /fix-manifest.py $s3_manifest
|
||||||
|
|||||||
Reference in New Issue
Block a user