update docker build

This commit is contained in:
Janik von Rotz committed 2023-11-14 17:36:04 +01:00
1 parent 6dde1a9174
commit 8a6bcbd356
12 files changed
+25 -49

No files matched your search

+2 -4
View File
@@ -1,5 +1,3 @@
**
!entrypoint.sh
!wait-for-psql.py
!odoo.conf
!odoo
!odoo
!build
+3 -3
View File
@@ -69,7 +69,7 @@ RUN npm install -g rtlcss
# Install Odoo
ENV ODOO_VERSION 16.0
COPY odoo /usr/lib/python3/dist-packages/odoo
COPY ./odoo /usr/lib/python3/dist-packages/odoo
RUN pip install -r /usr/lib/python3/dist-packages/odoo/requirements.txt
RUN useradd -ms /bin/bash odoo
@@ -82,8 +82,8 @@ RUN useradd -ms /bin/bash odoo
# && rm -rf /var/lib/apt/lists/* odoo.deb
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /etc/odoo/
COPY ./build/entrypoint.sh /
COPY ./build/odoo.conf /etc/odoo/
# Set permissions and Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
RUN chown odoo /etc/odoo/odoo.conf \
File renamed without changes.
View File
File renamed without changes.
File renamed without changes.
-6
View File
@@ -1,6 +0,0 @@
[options]
admin_passwd = $pbkdf2-sha512$25000$v7dWau29F0LIee/9n/M.pw$uB2sLuvV7I.QlnLCYlR1enNps2D.chZbzavM2g/MAsMXgfkx/AC2X8sTejf4zfe21yOSPOpmdhWTgQSoYqGAPA
limit_time_real = 600
db_host = localhost
db_password = odoo
db_user = odoo
+3 -3
View File
@@ -1,6 +1,6 @@
[options]
addons_path = /mnt/enterprise,/mnt/themes,/mnt/oca/partner-contact,/mnt/addons/server_tools,/mnt/addons/project,/mnt/oca/project,/mnt/oca/web,/mnt/oca/timesheet,/mnt/oca/crm,/mnt/oca/knowledge,/mnt/oca/server-auth,/mnt/oca/server-backend,/mnt/oca/server-ux,/mnt/oca/brand,/mnt/oca/hr,/mnt/oca/website,/mnt/oca/reporting-engine,/mnt/oca/server-tools,/mnt/oca/product-attribute,/mnt/oca/sale-workflow,/mnt/oca/social,/mnt/oca/bank-statement-import,/mnt/oca/rest-framework,/mnt/oca/contract,/mnt/oca/purchase-workflow,/mnt/oca/stock-logistics-warehouse,/mnt/oca/account-invoicing,/mnt/oca/server-env,/mnt/oca/business-requirement,/mnt/oca/connector,/mnt/oca/edi,/mnt/oca/community-data-files,/mnt/oca/account-financial-reporting,/mnt/oca/iot,/mnt/oca/manufacture,/mnt/oca/account-closing,/mnt/oca/account-financial-tools,/mnt/oca/bank-payment,/mnt/addons/odoo_apps_partner,/mnt/addons/sale_workflow,/mnt/oca/credit-control,/mnt/addons/hr,/mnt/addons/manufacture,/mnt/addons/stock_logistics_workflow,/mnt/oca/stock-logistics-workflow,/mnt/addons/website,/mnt/addons/product_attribute,/mnt/addons/partner_contact,/mnt/addons/vertical_saas,/mnt/addons/social,/mnt/addons/vertical_job_portal,/mnt/oca/management-system,/mnt/oca/hr-holidays,/mnt/oca/sale-reporting,/mnt/oca/account-reconcile,/mnt/addons/account_financial_reporting,/mnt/addons/purchase_workflow,/mnt/addons/account_invoicing,/mnt/oca/e-commerce,/mnt/thirdparty/odoo-apps-partner-contact,/mnt/../odoo-cd/untracked-odoo-apps
admin_passwd = $pbkdf2-sha512$25000$v7dWau29F0LIee/9n/M.pw$uB2sLuvV7I.QlnLCYlR1enNps2D.chZbzavM2g/MAsMXgfkx/AC2X8sTejf4zfe21yOSPOpmdhWTgQSoYqGAPA
data_dir = /var/lib/odoo
limit_time_real = 600
worker = 2
db_host = localhost
db_password = odoo
db_user = odoo
+1 -1
View File
@@ -13,7 +13,7 @@ services:
- "127.0.0.1:8069:8069"
volumes:
- odoo-data:/var/lib/odoo
- ./config:/etc/odoo
- ./config/odoo-docker.config:/etc/odoo/odoo.conf
- ./addons:/mnt/addons
- ./oca:/mnt/oca
- ./enterprise:/mnt/enterprise
+1 -1
Submodule odoo updated: bcdeb64f03...1a1b9b27ef.
+14 -29
View File
@@ -226,6 +226,7 @@ function start() {
if [[ "$1" =~ "odoo" ]]; then
# share-filestore
echo $DOCKER_ADDONS_PATH
docker-compose up -d odoo
echo "Open http://localhost:8069 url in your browser."
fi
@@ -234,7 +235,7 @@ function start() {
activate-venv
echo "Open http://localhost:8069 url in your browser."
open-url-with-delay "http://localhost:8069/web?db=$DATABASE" &
odoo-bin --config "config/odoo-native.conf" --addons-path="$ADDONS_PATH" --dev=all --log-handler odoo.tools.convert:DEBUG
odoo-bin --config "config/odoo.conf" --addons-path="$ADDONS_PATH" --dev=all --log-handler odoo.tools.convert:DEBUG
fi
if [[ "$1" =~ "mail" ]]; then
@@ -278,7 +279,7 @@ function start-shell() {
DATABASE=${DATABASE:="$GIT_BRANCH"}
activate-venv
odoo-bin shell -d "$DATABASE" --config 'config/odoo-native.conf' --no-http
odoo-bin shell -d "$DATABASE" --config 'config/odoo.conf' --no-http
}
function start-psql() {
@@ -295,7 +296,7 @@ function init-db() {
activate-venv
set-addons-path
echo "Make sure only one odoo process is running when initalizing the database."
odoo-bin -d "$DATABASE" -i base --config 'config/odoo-native.conf' --addons-path="$ADDONS_PATH" --stop-after-init --no-http --load-language "$ODOO_LANGUAGE"
odoo-bin -d "$DATABASE" -i base --config 'config/odoo.conf' --addons-path="$ADDONS_PATH" --stop-after-init --no-http --load-language "$ODOO_LANGUAGE"
}
function odoo-cloc() {
@@ -303,7 +304,7 @@ function odoo-cloc() {
DATABASE=${DATABASE:="$GIT_BRANCH"}
activate-venv
odoo-bin cloc -d "$DATABASE" --config 'config/odoo-native.conf' --stop-after-init --no-http
odoo-bin cloc -d "$DATABASE" --config 'config/odoo.conf' --stop-after-init --no-http
}
function lint-module() {
@@ -341,7 +342,7 @@ function update-module() {
activate-venv
set-addons-path
echo "Updating module $MODULE_NAME on $DATABASE ..."
odoo-bin -d "$DATABASE" -u "$MODULE_NAME" --config 'config/odoo-native.conf' --addons-path="$ADDONS_PATH" --stop-after-init --no-http
odoo-bin -d "$DATABASE" -u "$MODULE_NAME" --config 'config/odoo.conf' --addons-path="$ADDONS_PATH" --stop-after-init --no-http
}
function generate-module-translation() {
@@ -366,7 +367,7 @@ function generate-module-translation() {
set-addons-path
echo "Generate $LANGUAGE tranlsation file for $MODULE_NAME on $DATABASE ..."
mkdir -p "$MODULE_PATH/i18n/"
odoo-bin -d "$DATABASE" --config 'config/odoo-native.conf' --addons-path="$ADDONS_PATH" --modules "$MODULE_NAME" -l "$LANGUAGE" --i18n-export "$MODULE_PATH/i18n/$LANGUAGE.po"
odoo-bin -d "$DATABASE" --config 'config/odoo.conf' --addons-path="$ADDONS_PATH" --modules "$MODULE_NAME" -l "$LANGUAGE" --i18n-export "$MODULE_PATH/i18n/$LANGUAGE.po"
}
function list-addons() {
@@ -390,7 +391,7 @@ function install-module() {
activate-venv
set-addons-path
echo "Installing module $MODULE_NAME on $DATABASE ..."
odoo-bin -d "$DATABASE" -i "$MODULE_NAME" --config 'config/odoo-native.conf' --addons-path="$ADDONS_PATH" --stop-after-init --no-http
odoo-bin -d "$DATABASE" -i "$MODULE_NAME" --config 'config/odoo.conf' --addons-path="$ADDONS_PATH" --stop-after-init --no-http
}
function test-module() {
@@ -406,7 +407,7 @@ function test-module() {
activate-venv
set-addons-path
echo "Testing module $MODULE_NAME on $DATABASE ..."
odoo-bin -d "$DATABASE" -i "$MODULE_NAME" --config 'config/odoo-native.conf' --addons-path="$ADDONS_PATH" --stop-after-init --test-tags /"$MODULE_NAME"
odoo-bin -d "$DATABASE" -i "$MODULE_NAME" --config 'config/odoo.conf' --addons-path="$ADDONS_PATH" --stop-after-init --test-tags /"$MODULE_NAME"
}
function remove-module() {
@@ -425,7 +426,7 @@ function remove-module() {
set-addons-path
echo "Remove module $MODULE_NAME"
echo "self.env['ir.module.module'].search([('name', '=', '$MODULE_NAME')]).button_immediate_uninstall()" |
odoo-bin shell -d "$DATABASE" --config 'config/odoo-native.conf' --addons-path="$ADDONS_PATH" --no-http
odoo-bin shell -d "$DATABASE" --config 'config/odoo.conf' --addons-path="$ADDONS_PATH" --no-http
}
function create-module() {
@@ -479,7 +480,7 @@ function reset-views() {
activate-venv
echo "Reset views for key $KEY"
echo "self.env['ir.ui.view'].search([('key', 'ilike', '$KEY')]).reset_arch(mode='hard')" |
odoo-bin shell -d "$DATABASE" --config 'config/odoo-native.conf' --no-http
odoo-bin shell -d "$DATABASE" --config 'config/odoo.conf' --no-http
}
function convert-database() {
@@ -754,7 +755,7 @@ function update-app-list() {
if test -z "$1"; then echo "\$1 is empty."; exit; fi
activate-venv
echo "env['ir.module.module'].update_list()" | odoo-bin shell -d "$1" --config 'config/odoo-native.conf' --no-http
echo "env['ir.module.module'].update_list()" | odoo-bin shell -d "$1" --config 'config/odoo.conf' --no-http
}
function init-config-dir() {
@@ -833,7 +834,7 @@ function save-config() {
if test -z "$1"; then echo "\$1 is empty."; exit; fi
activate-venv
odoo-bin -s -d "$1" --config 'config/odoo-native.conf' --stop-after-init --no-http
odoo-bin -s -d "$1" --config 'config/odoo.conf' --stop-after-init --no-http
}
function remove-submodule() {
@@ -855,19 +856,6 @@ function remove-submodule() {
echo "Remove $1 submodule from .gitmodules files manually."
}
function update-config() {
set-addons-path
# Update native config
sed -i'' -e "s|addons_path.*|addons_path = $ADDONS_PATH|g" "./config/odoo-native.conf"
# Update docker config
sed -i'' -e "s|addons_path.*|addons_path = /mnt/$DOCKER_ADDONS_PATH|g" "./config/odoo.conf"
echo "Config updated."
}
function git-list-submodules() {
git config --file .gitmodules --get-regexp url | sed -e 's/submodule.//g' -e 's/.url//g' | awk '{ print $1 "," $2}'
@@ -925,7 +913,7 @@ function update-docs() {
With a snippet you can e.g. hide a field on the contact form. \
A snippet name is unique and follows the \`\$COMPANY.\$MODULE.\$XML_ID.\$DESCRIPTION\` schema." >> snippets.md
PATH_URL="https://github.com/Mint-System/Odoo-Build/tree/14.0"
PATH_URL="https://github.com/Mint-System/Odoo-Build/tree/16.0"
# Get all modules
MODULES=$(ls snippets/*.xml | xargs -n 1 basename | cut -d. -f1 | sort | uniq)
@@ -1117,9 +1105,6 @@ case "$1" in
git-switch-branch)
git-switch-branch "$2"
;;
update-config)
update-config
;;
git-list-submodules)
git-list-submodules
;;
-1
View File
@@ -58,7 +58,6 @@
| test-jsonrpc | [env] | Test json rpc connection. |
| test-module | [db][name,path] | Test target Odoo module. |
| update-app-list | [db] | Update app list. |
| update-config | | Update Odoo native and docker config files. |
| update-docs | | Update project docs. |
| update-module | [db][name,path] | Update target Odoo module. |
| update-readme | [path] | Update Readme file of Odoo module collection. |