Skip to content

Commit d07250e

Browse files
committed
Added ODOO_PYTHON_REQUIREMENTS for specying requirements.txt to auto-install
1 parent 545e19b commit d07250e

File tree

3 files changed

+18
-3
lines changed

3 files changed

+18
-3
lines changed

13.0/entrypoint.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ if [ -v PASSWORD_FILE ]; then
66
PASSWORD="$(< $PASSWORD_FILE)"
77
fi
88

9+
if [ -v ODOO_PYTHON_REQUIREMENTS -a -f "$ODOO_PYTHON_REQUIREMENTS" ]; then
10+
# Install python requirements from specified requirements.txt file
11+
pip install -r "$ODOO_PYTHON_REQUIREMENTS"
12+
fi
13+
914
# set the postgres database host, port, user and password according to the environment
1015
# and pass them as arguments to the odoo process if not present in the config file
1116
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
@@ -17,7 +22,7 @@ DB_ARGS=()
1722
function check_config() {
1823
param="$1"
1924
value="$2"
20-
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
25+
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
2126
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
2227
fi;
2328
DB_ARGS+=("--${param}")

14.0/entrypoint.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ if [ -v PASSWORD_FILE ]; then
66
PASSWORD="$(< $PASSWORD_FILE)"
77
fi
88

9+
if [ -v ODOO_PYTHON_REQUIREMENTS -a -f "$ODOO_PYTHON_REQUIREMENTS" ]; then
10+
# Install python requirements from specified requirements.txt file
11+
pip install -r "$ODOO_PYTHON_REQUIREMENTS"
12+
fi
13+
914
# set the postgres database host, port, user and password according to the environment
1015
# and pass them as arguments to the odoo process if not present in the config file
1116
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
@@ -17,7 +22,7 @@ DB_ARGS=()
1722
function check_config() {
1823
param="$1"
1924
value="$2"
20-
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
25+
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
2126
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
2227
fi;
2328
DB_ARGS+=("--${param}")

15.0/entrypoint.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ if [ -v PASSWORD_FILE ]; then
66
PASSWORD="$(< $PASSWORD_FILE)"
77
fi
88

9+
if [ -v ODOO_PYTHON_REQUIREMENTS -a -f "$ODOO_PYTHON_REQUIREMENTS" ]; then
10+
# Install python requirements from specified requirements.txt file
11+
pip install -r "$ODOO_PYTHON_REQUIREMENTS"
12+
fi
13+
914
# set the postgres database host, port, user and password according to the environment
1015
# and pass them as arguments to the odoo process if not present in the config file
1116
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
@@ -17,7 +22,7 @@ DB_ARGS=()
1722
function check_config() {
1823
param="$1"
1924
value="$2"
20-
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
25+
if grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
2126
value=$(grep -E "^\s*\b${param}\b\s*=" "$ODOO_RC" |cut -d " " -f3|sed 's/["\n\r]//g')
2227
fi;
2328
DB_ARGS+=("--${param}")

0 commit comments

Comments
 (0)