-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
13 changed files
with
301 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
FROM python:3.10-bullseye | ||
MAINTAINER Camptocamp | ||
ARG UID=999 | ||
# create the working directory and a place to set the logs (if wanted) | ||
RUN mkdir -p /odoo /var/log/odoo | ||
|
||
COPY ./base_requirements.txt /odoo | ||
COPY ./install /install | ||
|
||
# Moved because there was a bug while installing `odoo-autodiscover`. There is | ||
# an accent in the contributor name | ||
ENV LANG=C.UTF-8 \ | ||
LC_ALL=C.UTF-8 | ||
|
||
# build and dev packages | ||
ENV BUILD_PACKAGE \ | ||
build-essential \ | ||
gcc \ | ||
libevent-dev \ | ||
libfreetype6-dev \ | ||
libxml2-dev \ | ||
libxslt1-dev \ | ||
libsasl2-dev \ | ||
libldap2-dev \ | ||
libssl-dev \ | ||
libjpeg-dev \ | ||
libpng-dev \ | ||
zlib1g-dev \ | ||
git | ||
|
||
# Install some deps, lessc and less-plugin-clean-css, and wkhtmltopdf | ||
# wkhtml-buster is kept as in official image, no deb available for bullseye | ||
RUN set -x; \ | ||
sh -c /install/package_odoo-bullseye.sh \ | ||
&& /install/setup-pip.sh \ | ||
&& /install/postgres.sh \ | ||
&& /install/kwkhtml_client.sh \ | ||
&& /install/kwkhtml_client_force_python3.sh \ | ||
&& /install/dev_package.sh \ | ||
&& python3 -m pip install --force-reinstall pip "setuptools<58" \ | ||
&& pip install -r /odoo/base_requirements.txt --ignore-installed \ | ||
&& /install/purge_dev_package_and_cache.sh | ||
|
||
# grab dockerize to generate template and | ||
# wait on postgres | ||
RUN /install/dockerize.sh | ||
|
||
COPY ./src_requirements.txt /odoo | ||
COPY ./bin /odoo/odoo-bin | ||
COPY ./templates /templates | ||
COPY ./before-migrate-entrypoint.d /odoo/before-migrate-entrypoint.d | ||
COPY ./start-entrypoint.d /odoo/start-entrypoint.d | ||
COPY ./MANIFEST.in /odoo | ||
RUN adduser --disabled-password -u $UID --gecos '' odoo \ | ||
&& touch /odoo/odoo.cfg \ | ||
&& mkdir -p /odoo/data/odoo/{addons,filestore,sessions} \ | ||
&& chown -R odoo:odoo /odoo && usermod odoo --home /odoo \ | ||
&& chown -R odoo:odoo /var/log/odoo | ||
|
||
VOLUME ["/data/odoo", "/var/log/odoo"] | ||
USER odoo | ||
# Expose Odoo services | ||
EXPOSE 8069 8072 | ||
|
||
ENV ODOO_VERSION=17.0 \ | ||
PATH=/odoo/odoo-bin:/odoo/.local/bin:$PATH \ | ||
LANG=C.UTF-8 \ | ||
LC_ALL=C.UTF-8 \ | ||
DB_HOST=db \ | ||
DB_PORT=5432 \ | ||
DB_NAME=odoodb \ | ||
DB_USER=odoo \ | ||
DB_PASSWORD=odoo \ | ||
ODOO_BASE_URL=http://localhost:8069 \ | ||
ODOO_REPORT_URL=http://localhost:8069 \ | ||
# the place where you put the data of your project (csv, ...) | ||
ODOO_DATA_PATH=/odoo/data \ | ||
DEMO=False \ | ||
ADDONS_PATH=/odoo/local-src,/odoo/src/addons \ | ||
OPENERP_SERVER=/odoo/odoo.cfg | ||
|
||
ENTRYPOINT ["docker-entrypoint.sh"] | ||
CMD ["odoo"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
recursive-include odoo/data * |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Odoo dependencies | ||
Babel==2.11.0 | ||
chardet==5.0.0 | ||
decorator==5.1.1 | ||
docutils==0.19 | ||
ebaysdk==2.2.0 | ||
freezegun==1.2.2 | ||
gevent==22.10.2 | ||
greenlet==2.0.1 | ||
html2text==2020.1.16 | ||
idna==3.4 | ||
Jinja2==3.1.2 | ||
libsass==0.21.0 | ||
lxml==4.9.1 | ||
Mako==1.2.3 | ||
MarkupSafe==2.1.1 | ||
num2words==0.5.12 | ||
ofxparse==0.21 | ||
passlib==1.7.4 | ||
Pillow==9.3.0 | ||
polib==1.1.1 | ||
psutil==5.9.4 | ||
psycopg2==2.9.5 | ||
pydot==1.4.2 | ||
python-ldap==3.4.3 | ||
PyPDF2==1.27.12 | ||
pyserial==3.5 | ||
python-dateutil==2.8.2 | ||
pytz==2022.6 | ||
pyusb==1.2.1 | ||
qrcode==7.3.1 | ||
reportlab==3.6.12 | ||
requests==2.28.1 | ||
zeep==4.2.0 | ||
python-stdnum==1.17 | ||
vobject==0.9.6.1 | ||
Werkzeug==0.16.1 | ||
XlsxWriter==3.0.3 | ||
xlwt==1.3.0 | ||
xlrd==2.0.1 | ||
pyOpenSSL==22.1.0 | ||
|
||
setuptools<58 | ||
|
||
# Not part of official requirements, but used by some addons | ||
# colorama==0.3.9 | ||
gdata==2.0.18 | ||
html5lib==1.1 | ||
odfpy==1.4.1 | ||
pyinotify==0.9.6 | ||
simplejson==3.17.6 | ||
urllib3==1.26.7 | ||
|
||
# Migration tools | ||
marabunta==0.10.6 | ||
-e git+https://github.com/camptocamp/anthem@master#egg=anthem | ||
|
||
# test / lint | ||
# those libs and their dependencies are unpinned | ||
# to always test with the last version of it | ||
flake8 | ||
pytest>=5.4.2 | ||
pluggy | ||
coverage | ||
pytest-odoo>=0.4.7 | ||
pytest-cov>=2.10.0 | ||
watchdog | ||
|
||
# Library dependency | ||
argh==0.26.2 | ||
atomicwrites==1.4.1 | ||
attrs==22.1.0 | ||
beautifulsoup4==4.11.1 | ||
future==0.18.2 | ||
mccabe==0.7.0 | ||
more-itertools==9.0.0 | ||
pathtools==0.1.2 | ||
pbr==5.11.0 | ||
pexpect==4.8.0 | ||
ptyprocess==0.7.0 | ||
py==1.11.0 | ||
pycodestyle==2.9.1 | ||
pyflakes==2.5.0 | ||
unicodecsv==0.14.1 | ||
wrapt==1.14.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Extra python dependencies | ||
algoliasearch==2.6.2 | ||
Adyen==7.1.1 | ||
cachetools==5.2.0 | ||
cerberus==1.3.4 | ||
boto3==1.26.7 | ||
factur-x==2.3 | ||
invoice2data==0.3.6 | ||
mailjet-rest==1.3.4 | ||
openupgradelib==3.5.0 | ||
paramiko==2.12.0 | ||
parse-accept-language==0.1.2 | ||
paypalrestsdk==1.13.1 | ||
phonenumbers==8.13.0 | ||
pyquerystring==1.1 | ||
pyOpenSSL==22.1.0 | ||
pyquerystring==1.1 | ||
pysimplesoap==1.16.2 | ||
requests-mock==1.10.0 | ||
slugify==0.0.1 | ||
stripe==4.2.0 | ||
unidecode==1.3.6 | ||
vcrpy==4.2.1 | ||
|
||
# Library dependency | ||
asn1crypto==1.5.1 | ||
bcrypt==4.0.1 | ||
botocore==1.29.7 | ||
cffi==1.15.1 | ||
cryptography==38.0.3 | ||
dateparser==1.1.3 | ||
idna==3.4 | ||
jmespath==1.0.1 | ||
multidict==6.0.2 | ||
pdfminer.six==20221105 | ||
pyasn1==0.4.8 | ||
pycparser==2.21 | ||
pycryptodome==3.15.0 | ||
PyNaCl==1.5.0 | ||
pytesseract==0.3.10 | ||
regex==2022.10.31 | ||
s3transfer==0.6.0 | ||
tzlocal==4.2 | ||
Unidecode==1.3.6 | ||
yarl==1.8.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Requirements for the project itself and for Odoo. | ||
# When we install Odoo with -e, odoo.py is available in the PATH and | ||
# 'openerp' in the PYTHONPATH | ||
# | ||
# They are installed only after all the project's files have been copied | ||
# into the image (with ONBUILD) | ||
-e . | ||
-e src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
[options] | ||
addons_path = {{ .Env.ADDONS_PATH }} | ||
data_dir = /odoo/data/odoo | ||
auto_reload = False | ||
db_host = {{ .Env.DB_HOST }} | ||
db_name = {{ .Env.DB_NAME }} | ||
db_user = {{ .Env.DB_USER }} | ||
db_password = {{ .Env.DB_PASSWORD }} | ||
db_sslmode = {{ default .Env.DB_SSLMODE "prefer" }} | ||
dbfilter = ^{{ default .Env.DB_FILTER .Env.DB_NAME }}$ | ||
list_db = {{ default .Env.LIST_DB "False" }} | ||
admin_passwd = {{ default .Env.ADMIN_PASSWD "" }} | ||
db_maxconn = {{ default .Env.DB_MAXCONN "64" }} | ||
limit_memory_soft = {{ default .Env.LIMIT_MEMORY_SOFT "2147483648" }} | ||
limit_memory_hard = {{ default .Env.LIMIT_MEMORY_HARD "2684354560" }} | ||
limit_request = {{ default .Env.LIMIT_REQUEST "8192" }} | ||
limit_time_cpu = {{ default .Env.LIMIT_TIME_CPU "60" }} | ||
limit_time_real = {{ default .Env.LIMIT_TIME_REAL "120" }} | ||
limit_time_real_cron = {{ default .Env.LIMIT_TIME_REAL_CRON "120" }} | ||
log_handler = {{ default .Env.LOG_HANDLER "':INFO'" }} | ||
log_level = {{ default .Env.LOG_LEVEL "info" }} | ||
max_cron_threads = {{ default .Env.MAX_CRON_THREADS "2" }} | ||
workers = {{ default .Env.WORKERS "4" }} | ||
logfile = {{ default .Env.LOGFILE "None" }} | ||
log_db = {{ default .Env.LOG_DB "False" }} | ||
logrotate = True | ||
syslog = {{ default .Env.SYSLOG "False" }} | ||
running_env = {{ default .Env.RUNNING_ENV "dev" }} | ||
without_demo = {{ default .Env.WITHOUT_DEMO "True" }} | ||
server_wide_modules = {{ default .Env.SERVER_WIDE_MODULES "" }} | ||
; db_sslmode = | ||
; We can activate proxy_mode even if we are not behind a proxy, because | ||
; it is used only if HTTP_X_FORWARDED_HOST is set in environ | ||
proxy_mode = True | ||
; csv_internal_sep = , | ||
; db_template = template1 | ||
; debug_mode = False | ||
; email_from = False | ||
; http_port = 8069 | ||
; http_enable = True | ||
; http_interface = | ||
; longpolling_port = 8072 | ||
; 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 | ||
unaccent = {{ default .Env.UNACCENT "False" }} | ||
{{ default .Env.ADDITIONAL_ODOO_RC "" }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/bin/bash | ||
# | ||
# Wait until postgresql is running. | ||
# | ||
set -e | ||
|
||
if [[ -d $DB_HOST ]]; then | ||
dockerize -timeout 30s -wait unix://${DB_HOST}/.s.PGSQL.${DB_PORT} | ||
else | ||
dockerize -timeout 30s -wait tcp://${DB_HOST}:${DB_PORT} | ||
fi | ||
|
||
# now the port is up but sometimes postgres is not totally ready yet: | ||
# 'createdb: could not connect to database template1: FATAL: the database system is starting up' | ||
# we retry if we get this error | ||
|
||
while [ "$(PGPASSWORD=$DB_PASSWORD psql -h ${DB_HOST} -U $DB_USER -c '' postgres 2>&1)" = "psql: FATAL: the database system is starting up" ] | ||
do | ||
echo "Waiting for the database system to start up" | ||
sleep 0.1 | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters