diff --git a/10.0/20161123/Dockerfile b/10.0/20161123/Dockerfile index 4e7d59b..91e97af 100644 --- a/10.0/20161123/Dockerfile +++ b/10.0/20161123/Dockerfile @@ -11,8 +11,8 @@ ENV ODOO_RC /etc/odoo/odoo.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/10.0/nightly/deb/odoo_10.0.20161123_all.deb && echo "3c9edd6f1b5673c2a87fe65cfa5f404ef5f9c8e7 odoo.deb" | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "10.0/entrypoint.sh" / -COPY "10.0/odoo.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./odoo.conf" /etc/odoo/ RUN chown odoo /etc/odoo/odoo.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/10.0/20161123/entrypoint.sh b/10.0/20161123/entrypoint.sh new file mode 100755 index 0000000..4f0ef59 --- /dev/null +++ b/10.0/20161123/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | odoo) + shift + if [[ "$1" == "scaffold" ]] ; then + exec odoo "$@" + else + exec odoo "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec odoo "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/10.0/20161123/odoo.conf b/10.0/20161123/odoo.conf new file mode 100644 index 0000000..1518388 --- /dev/null +++ b/10.0/20161123/odoo.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/odoo/addons +data_dir = /var/lib/odoo +auto_reload = True +; admin_passwd = admin +; csv_internal_sep = , +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +; logfile = None +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/10.0/20161230/Dockerfile b/10.0/20161230/Dockerfile index ece842c..e5bc307 100644 --- a/10.0/20161230/Dockerfile +++ b/10.0/20161230/Dockerfile @@ -11,8 +11,8 @@ ENV ODOO_RC /etc/odoo/odoo.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/10.0/nightly/deb/odoo_10.0.20161230_all.deb && echo "02d24f88c66a34c23f53e396c8c9d1adb1366d95 odoo.deb" | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "10.0/entrypoint.sh" / -COPY "10.0/odoo.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./odoo.conf" /etc/odoo/ RUN chown odoo /etc/odoo/odoo.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/10.0/20161230/entrypoint.sh b/10.0/20161230/entrypoint.sh new file mode 100755 index 0000000..4f0ef59 --- /dev/null +++ b/10.0/20161230/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | odoo) + shift + if [[ "$1" == "scaffold" ]] ; then + exec odoo "$@" + else + exec odoo "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec odoo "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/10.0/20161230/odoo.conf b/10.0/20161230/odoo.conf new file mode 100644 index 0000000..1518388 --- /dev/null +++ b/10.0/20161230/odoo.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/odoo/addons +data_dir = /var/lib/odoo +auto_reload = True +; admin_passwd = admin +; csv_internal_sep = , +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +; logfile = None +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/8.0/20161123/Dockerfile b/8.0/20161123/Dockerfile index a935499..43dc75c 100644 --- a/8.0/20161123/Dockerfile +++ b/8.0/20161123/Dockerfile @@ -11,8 +11,8 @@ ENV OPENERP_SERVER /etc/odoo/openerp-server.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/8.0/nightly/deb/odoo_8.0.20161123_all.deb && echo 'fcc9fa35fae811958ee08a0f51dfc23242e755b6 odoo.deb' | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "8.0/entrypoint.sh" / -COPY "8.0/openerp-server.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./openerp-server.conf" /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/8.0/20161123/entrypoint.sh b/8.0/20161123/entrypoint.sh new file mode 100755 index 0000000..a958c3c --- /dev/null +++ b/8.0/20161123/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$OPENERP_SERVER" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | openerp-server) + shift + if [[ "$1" == "scaffold" ]] ; then + exec openerp-server "$@" + else + exec openerp-server "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec openerp-server "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/8.0/20161123/openerp-server.conf b/8.0/20161123/openerp-server.conf new file mode 100644 index 0000000..0a1a0ed --- /dev/null +++ b/8.0/20161123/openerp-server.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/openerp/addons +data_dir = /var/lib/odoo +auto_reload = True +; admin_passwd = admin +; csv_internal_sep = , +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +; logfile = None +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/8.0/20161230/Dockerfile b/8.0/20161230/Dockerfile index 924942a..3ee422c 100644 --- a/8.0/20161230/Dockerfile +++ b/8.0/20161230/Dockerfile @@ -11,8 +11,8 @@ ENV OPENERP_SERVER /etc/odoo/openerp-server.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/8.0/nightly/deb/odoo_8.0.20161230_all.deb && echo 'ba32245d9971a7ee3e2b3eb5e54dcab7ec3f209f odoo.deb' | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "8.0/entrypoint.sh" / -COPY "8.0/openerp-server.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./openerp-server.conf" /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/8.0/20161230/entrypoint.sh b/8.0/20161230/entrypoint.sh new file mode 100755 index 0000000..a958c3c --- /dev/null +++ b/8.0/20161230/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$OPENERP_SERVER" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | openerp-server) + shift + if [[ "$1" == "scaffold" ]] ; then + exec openerp-server "$@" + else + exec openerp-server "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec openerp-server "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/8.0/20161230/openerp-server.conf b/8.0/20161230/openerp-server.conf new file mode 100644 index 0000000..0a1a0ed --- /dev/null +++ b/8.0/20161230/openerp-server.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/openerp/addons +data_dir = /var/lib/odoo +auto_reload = True +; admin_passwd = admin +; csv_internal_sep = , +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +; logfile = None +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/9.0/20160101/Dockerfile b/9.0/20160101/Dockerfile index 896dc68..c39f6d4 100644 --- a/9.0/20160101/Dockerfile +++ b/9.0/20160101/Dockerfile @@ -11,8 +11,8 @@ ENV OPENERP_SERVER /etc/odoo/openerp-server.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/9.0/nightly/deb/odoo_9.0c.20160101_all.deb && echo "d55a3f5317529defe8cf8a8eec82ae6159a0fe81 odoo.deb" | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "9.0/entrypoint.sh" / -COPY "9.0/openerp-server.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./openerp-server.conf" /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/9.0/20160101/entrypoint.sh b/9.0/20160101/entrypoint.sh new file mode 100755 index 0000000..a958c3c --- /dev/null +++ b/9.0/20160101/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$OPENERP_SERVER" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | openerp-server) + shift + if [[ "$1" == "scaffold" ]] ; then + exec openerp-server "$@" + else + exec openerp-server "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec openerp-server "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/9.0/20160101/openerp-server.conf b/9.0/20160101/openerp-server.conf new file mode 100644 index 0000000..3f308e8 --- /dev/null +++ b/9.0/20160101/openerp-server.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/openerp/addons +; admin_passwd = admin +auto_reload = True +; csv_internal_sep = , +data_dir = /var/lib/odoo +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +logfile = /var/log/odoo/odoo.log +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/9.0/20160512/Dockerfile b/9.0/20160512/Dockerfile index 8205e16..5cff6ce 100644 --- a/9.0/20160512/Dockerfile +++ b/9.0/20160512/Dockerfile @@ -11,8 +11,8 @@ ENV OPENERP_SERVER /etc/odoo/openerp-server.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/9.0/nightly/deb/odoo_9.0c.20160512_all.deb && echo "b25f026723fb67e333496f8741821f60795d3372 odoo.deb" | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "9.0/entrypoint.sh" / -COPY "9.0/openerp-server.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./openerp-server.conf" /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/9.0/20160512/entrypoint.sh b/9.0/20160512/entrypoint.sh new file mode 100755 index 0000000..a958c3c --- /dev/null +++ b/9.0/20160512/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$OPENERP_SERVER" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | openerp-server) + shift + if [[ "$1" == "scaffold" ]] ; then + exec openerp-server "$@" + else + exec openerp-server "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec openerp-server "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/9.0/20160512/openerp-server.conf b/9.0/20160512/openerp-server.conf new file mode 100644 index 0000000..3f308e8 --- /dev/null +++ b/9.0/20160512/openerp-server.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/openerp/addons +; admin_passwd = admin +auto_reload = True +; csv_internal_sep = , +data_dir = /var/lib/odoo +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +logfile = /var/log/odoo/odoo.log +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/9.0/20161123/Dockerfile b/9.0/20161123/Dockerfile index b3bffb2..ea81b8b 100644 --- a/9.0/20161123/Dockerfile +++ b/9.0/20161123/Dockerfile @@ -11,8 +11,8 @@ ENV OPENERP_SERVER /etc/odoo/openerp-server.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/9.0/nightly/deb/odoo_9.0c.20161123_all.deb && echo "c9e66e878146940ef188eaa8c9bc5da7e4306982 odoo.deb" | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "9.0/entrypoint.sh" / -COPY "9.0/openerp-server.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./openerp-server.conf" /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons diff --git a/9.0/20161123/entrypoint.sh b/9.0/20161123/entrypoint.sh new file mode 100755 index 0000000..a958c3c --- /dev/null +++ b/9.0/20161123/entrypoint.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +set -e + +# set the postgres database host, port, user and password according to the environment +# and pass them as arguments to the odoo process if not present in the config file +: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}} +: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}} +: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}} +: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}} + +DB_ARGS=() +function check_config() { + param="$1" + value="$2" + if ! grep -q -E "^\s*\b${param}\b\s*=" "$OPENERP_SERVER" ; then + DB_ARGS+=("--${param}") + DB_ARGS+=("${value}") + fi; +} +check_config "db_host" "$HOST" +check_config "db_port" "$PORT" +check_config "db_user" "$USER" +check_config "db_password" "$PASSWORD" + +case "$1" in + -- | openerp-server) + shift + if [[ "$1" == "scaffold" ]] ; then + exec openerp-server "$@" + else + exec openerp-server "$@" "${DB_ARGS[@]}" + fi + ;; + -*) + exec openerp-server "$@" "${DB_ARGS[@]}" + ;; + *) + exec "$@" +esac + +exit 1 diff --git a/9.0/20161123/openerp-server.conf b/9.0/20161123/openerp-server.conf new file mode 100644 index 0000000..3f308e8 --- /dev/null +++ b/9.0/20161123/openerp-server.conf @@ -0,0 +1,38 @@ +[options] +addons_path = /mnt/extra-addons,/usr/lib/python2.7/dist-packages/openerp/addons +; admin_passwd = admin +auto_reload = True +; csv_internal_sep = , +data_dir = /var/lib/odoo +; db_maxconn = 64 +; db_name = False +; db_template = template1 +; dbfilter = .* +; debug_mode = False +; email_from = False +; limit_memory_hard = 2684354560 +; limit_memory_soft = 2147483648 +; limit_request = 8192 +; limit_time_cpu = 60 +; limit_time_real = 120 +; list_db = True +; log_db = False +; log_handler = [':INFO'] +; log_level = info +logfile = /var/log/odoo/odoo.log +; longpolling_port = 8072 +; max_cron_threads = 2 +; osv_memory_age_limit = 1.0 +; osv_memory_count_limit = False +; smtp_password = False +; smtp_port = 25 +; smtp_server = localhost +; smtp_ssl = False +; smtp_user = False +; workers = 0 +; xmlrpc = True +; xmlrpc_interface = +; xmlrpc_port = 8069 +; xmlrpcs = True +; xmlrpcs_interface = +; xmlrpcs_port = 8071 diff --git a/9.0/20161230/Dockerfile b/9.0/20161230/Dockerfile index 994498e..8a83d04 100644 --- a/9.0/20161230/Dockerfile +++ b/9.0/20161230/Dockerfile @@ -11,8 +11,8 @@ ENV OPENERP_SERVER /etc/odoo/openerp-server.conf RUN set -x; curl -o odoo.deb -SL http://nightly.odoo.com/9.0/nightly/deb/odoo_9.0c.20161230_all.deb && echo "1795747dd859dc59405a40534206cb9c3632266f odoo.deb" | sha1sum -c - && dpkg --force-depends -i odoo.deb && apt-get update && apt-get -y install -f --no-install-recommends && rm -rf /var/lib/apt/lists/* odoo.deb # Copy entrypoint script and Odoo configuration file -COPY "9.0/entrypoint.sh" / -COPY "9.0/openerp-server.conf" /etc/odoo/ +COPY "./entrypoint.sh" / +COPY "./openerp-server.conf" /etc/odoo/ RUN chown odoo /etc/odoo/openerp-server.conf # Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons