Skip to content

Commit 6e7938a

Browse files
committed
[ADD] Odoo: 13.0
* Add Odoo version 13.0 release 20191009
1 parent b32f203 commit 6e7938a

File tree

3 files changed

+162
-0
lines changed

3 files changed

+162
-0
lines changed

13.0/Dockerfile

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
FROM debian:buster
2+
LABEL maintainer="Odoo S.A. <[email protected]>"
3+
4+
# Generate locale C.UTF-8 for postgres and general locale data
5+
ENV LANG C.UTF-8
6+
7+
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf
8+
RUN set -x; \
9+
apt-get update \
10+
&& apt-get install -y --no-install-recommends \
11+
ca-certificates \
12+
curl \
13+
dirmngr \
14+
fonts-noto-cjk \
15+
gnupg \
16+
libssl-dev \
17+
node-less \
18+
npm \
19+
python3-pip \
20+
python3-pyldap \
21+
python3-qrcode \
22+
python3-renderpm \
23+
python3-setuptools \
24+
python3-vobject \
25+
python3-watchdog \
26+
xz-utils \
27+
&& curl -o wkhtmltox.deb -sSL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb \
28+
&& echo '7e35a63f9db14f93ec7feeb0fce76b30c08f2057 wkhtmltox.deb' | sha1sum -c - \
29+
&& dpkg --force-depends -i wkhtmltox.deb\
30+
&& apt-get -y install -f --no-install-recommends \
31+
&& rm -rf /var/lib/apt/lists/* wkhtmltox.deb
32+
33+
# install latest postgresql-client
34+
RUN set -x; \
35+
echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' > etc/apt/sources.list.d/pgdg.list \
36+
&& export GNUPGHOME="$(mktemp -d)" \
37+
&& repokey='B97B0AFCAA1A47F044F244A07FCC7D46ACCC4CF8' \
38+
&& gpg --batch --keyserver keyserver.ubuntu.com --recv-keys "${repokey}" \
39+
&& gpg --armor --export "${repokey}" | apt-key add - \
40+
&& gpgconf --kill all \
41+
&& rm -rf "$GNUPGHOME" \
42+
&& apt-get update \
43+
&& apt-get install -y postgresql-client \
44+
&& rm -rf /var/lib/apt/lists/*
45+
46+
# Install rtlcss (on Debian buster)
47+
RUN set -x; \
48+
npm install -g rtlcss
49+
50+
# Install Odoo
51+
ENV ODOO_VERSION 13.0
52+
ARG ODOO_RELEASE=20191009
53+
ARG ODOO_SHA=468633ffd7ebacdde116e8708fd62f74788cd2b1
54+
RUN set -x; \
55+
curl -o odoo.deb -sSL http://nightly.odoo.com/${ODOO_VERSION}/nightly/deb/odoo_${ODOO_VERSION}.${ODOO_RELEASE}_all.deb \
56+
&& echo "${ODOO_SHA} odoo.deb" | sha1sum -c - \
57+
&& dpkg --force-depends -i odoo.deb \
58+
&& apt-get update \
59+
&& apt-get -y install -f --no-install-recommends \
60+
&& rm -rf /var/lib/apt/lists/* odoo.deb
61+
62+
# Copy entrypoint script and Odoo configuration file
63+
RUN pip3 install num2words xlwt
64+
COPY ./entrypoint.sh /
65+
COPY ./odoo.conf /etc/odoo/
66+
RUN chown odoo /etc/odoo/odoo.conf
67+
68+
# Mount /var/lib/odoo to allow restoring filestore and /mnt/extra-addons for users addons
69+
RUN mkdir -p /mnt/extra-addons \
70+
&& chown -R odoo /mnt/extra-addons
71+
VOLUME ["/var/lib/odoo", "/mnt/extra-addons"]
72+
73+
# Expose Odoo services
74+
EXPOSE 8069 8071
75+
76+
# Set the default config file
77+
ENV ODOO_RC /etc/odoo/odoo.conf
78+
79+
# Set default user when running the container
80+
USER odoo
81+
82+
ENTRYPOINT ["/entrypoint.sh"]
83+
CMD ["odoo"]

13.0/entrypoint.sh

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
# set the postgres database host, port, user and password according to the environment
6+
# and pass them as arguments to the odoo process if not present in the config file
7+
: ${HOST:=${DB_PORT_5432_TCP_ADDR:='db'}}
8+
: ${PORT:=${DB_PORT_5432_TCP_PORT:=5432}}
9+
: ${USER:=${DB_ENV_POSTGRES_USER:=${POSTGRES_USER:='odoo'}}}
10+
: ${PASSWORD:=${DB_ENV_POSTGRES_PASSWORD:=${POSTGRES_PASSWORD:='odoo'}}}
11+
12+
DB_ARGS=()
13+
function check_config() {
14+
param="$1"
15+
value="$2"
16+
if ! grep -q -E "^\s*\b${param}\b\s*=" "$ODOO_RC" ; then
17+
DB_ARGS+=("--${param}")
18+
DB_ARGS+=("${value}")
19+
fi;
20+
}
21+
check_config "db_host" "$HOST"
22+
check_config "db_port" "$PORT"
23+
check_config "db_user" "$USER"
24+
check_config "db_password" "$PASSWORD"
25+
26+
case "$1" in
27+
-- | odoo)
28+
shift
29+
if [[ "$1" == "scaffold" ]] ; then
30+
exec odoo "$@"
31+
else
32+
exec odoo "$@" "${DB_ARGS[@]}"
33+
fi
34+
;;
35+
-*)
36+
exec odoo "$@" "${DB_ARGS[@]}"
37+
;;
38+
*)
39+
exec "$@"
40+
esac
41+
42+
exit 1

13.0/odoo.conf

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
[options]
2+
addons_path = /mnt/extra-addons
3+
data_dir = /var/lib/odoo
4+
; admin_passwd = admin
5+
; csv_internal_sep = ,
6+
; db_maxconn = 64
7+
; db_name = False
8+
; db_template = template1
9+
; dbfilter = .*
10+
; debug_mode = False
11+
; email_from = False
12+
; limit_memory_hard = 2684354560
13+
; limit_memory_soft = 2147483648
14+
; limit_request = 8192
15+
; limit_time_cpu = 60
16+
; limit_time_real = 120
17+
; list_db = True
18+
; log_db = False
19+
; log_handler = [':INFO']
20+
; log_level = info
21+
; logfile = None
22+
; longpolling_port = 8072
23+
; max_cron_threads = 2
24+
; osv_memory_age_limit = 1.0
25+
; osv_memory_count_limit = False
26+
; smtp_password = False
27+
; smtp_port = 25
28+
; smtp_server = localhost
29+
; smtp_ssl = False
30+
; smtp_user = False
31+
; workers = 0
32+
; xmlrpc = True
33+
; xmlrpc_interface =
34+
; xmlrpc_port = 8069
35+
; xmlrpcs = True
36+
; xmlrpcs_interface =
37+
; xmlrpcs_port = 8071

0 commit comments

Comments
 (0)