Skip to content
Extraits de code Groupes Projets
Valider 98b74c73 rédigé par Rémi - Le Filament's avatar Rémi - Le Filament
Parcourir les fichiers

Create branch for version 12.0

parent ed9f0f9b
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
.git*
LICENSE
README*
image: docker:latest
image: docker:20.10.7
docker-build-master:
docker-build-10.0:
# Official docker image.
image: docker:19.03.12
image: docker:20.10.7
stage: build
services:
- docker:19.03.12-dind
- docker:20.10.7-dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -f 10.0.Dockerfile -t "$CI_REGISTRY_IMAGE:10.0" .
- docker push "$CI_REGISTRY_IMAGE:10.0"
only:
- 10.0
docker-build-12.0:
# Official docker image.
image: docker:20.10.7
stage: build
services:
- docker:20.10.7-dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -f 12.0.Dockerfile -t "$CI_REGISTRY_IMAGE:12.0" .
- docker build --pull -f 12.0_ml.Dockerfile -t "$CI_REGISTRY_IMAGE:12.0_ml" .
- docker build --pull -f 12.0_py3.6.Dockerfile -t "$CI_REGISTRY_IMAGE:12.0_py3.6" .
- docker build --pull -f 14.0.Dockerfile -t "$CI_REGISTRY_IMAGE:14.0" .
- docker push "$CI_REGISTRY_IMAGE:12.0"
- docker push "$CI_REGISTRY_IMAGE:12.0_ml"
- docker push "$CI_REGISTRY_IMAGE:12.0_py3.6"
- docker push "$CI_REGISTRY_IMAGE:14.0"
only:
- master
- 12.0
docker-build-14.0:
# Official docker image.
image: docker:20.10.7
stage: build
services:
- docker:20.10.7-dind
before_script:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script:
- docker build --pull -f 14.0.Dockerfile -t "$CI_REGISTRY_IMAGE:14.0" .
- docker push "$CI_REGISTRY_IMAGE:14.0"
only:
- 14.0
sudo: required
language: python
python:
- "3.6"
services:
- docker
git:
depth: 1
branches:
only:
- master
env:
global:
# Variables found by default in Docker Hub builder
- DOCKER_REPO=remifilament/odoo
matrix:
- DOCKER_TAG=10.0
before_install:
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::=--force-confnew install docker-ce
- pip install -r requirements-ci.txt
install:
- chown -R $USER:$USER .
- chmod -R +r .
- ./hooks/build
FROM debian:jessie
MAINTAINER Le Filament <https://le-filament.com>
ENV APT_DEPS='python-dev build-essential libxml2-dev libxslt1-dev libjpeg-dev libfreetype6-dev \
liblcms2-dev libopenjpeg-dev libtiff5-dev tk-dev tcl-dev linux-headers-amd64 \
libpq-dev libldap2-dev libsasl2-dev' \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PGDATABASE=odoo
RUN set -x; \
sed -Ei 's@(^deb http://deb.debian.org/debian jessie-updates main$)@#\1@' /etc/apt/sources.list &&\
apt-get update &&\
apt-get install -y --no-install-recommends \
ca-certificates \
curl \
fontconfig \
git \
libjpeg62-turbo \
libtiff5 \
libx11-6 \
libxcb1 \
libxext6 \
libxml2 \
libxrender1 \
libxslt1.1 \
node-less \
openssh-client \
python-gevent \
python-ldap \
python-qrcode \
python-renderpm \
python-support \
python-vobject \
python-watchdog \
sudo \
xfonts-75dpi \
xfonts-base \
&& \
echo 'deb http://apt.postgresql.org/pub/repos/apt/ jessie-pgdg main' >> /etc/apt/sources.list.d/postgresql.list &&\
curl -SL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - &&\
curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.jessie_amd64.deb &&\
echo '4d104ff338dc2d2083457b3b1e9baab8ddf14202 wkhtmltox.deb' | sha1sum -c - &&\
apt-get update &&\
dpkg --install wkhtmltox.deb &&\
apt-get install -y --no-install-recommends postgresql-client &&\
apt-get install -y --no-install-recommends ${APT_DEPS} &&\
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py | python /dev/stdin &&\
pip install -I -r https://raw.githubusercontent.com/OCA/OCB/10.0/requirements.txt &&\
pip install simplejson WTForms Werkzeug==0.14.1 &&\
apt-get -y purge ${APT_DEPS} &&\
apt-get -y autoremove &&\
rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# Add Git Known Hosts
COPY ./ssh_known_git_hosts /root/.ssh/known_hosts
# Install Odoo and remove not French translations and .git directory to limit amount of data used by container
RUN set -x; \
useradd -l --create-home --home-dir /opt/odoo --no-log-init odoo &&\
/bin/bash -c "mkdir -p /opt/odoo/{etc,odoo,additional_addons,private_addons,data,private}" &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/OCB.git /opt/odoo/odoo &&\
rm -rf /opt/odoo/odoo/.git &&\
find /opt/odoo/odoo/addons/*/i18n/ /opt/odoo/odoo/odoo/addons/base/i18n/ -type f -not -name 'fr.po' -delete &&\
chown -R odoo:odoo /opt/odoo
# Install Odoo OCA default dependencies
RUN set -x; \
mkdir -p /tmp/oca-repos/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/account-financial-reporting.git /tmp/oca-repos/account-financial-reporting &&\
mv /tmp/oca-repos/account-financial-reporting/account_tax_balance /opt/odoo/additional_addons/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/bank-statement-import.git /tmp/oca-repos/bank-statement-import &&\
mv /tmp/oca-repos/bank-statement-import/account_bank_statement_import_ofx \
/tmp/oca-repos/bank-statement-import/account_bank_statement_import_qif \
/opt/odoo/additional_addons/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/knowledge.git /tmp/oca-repos/knowledge &&\
mv /tmp/oca-repos/knowledge/knowledge /tmp/oca-repos/knowledge/document_page /opt/odoo/additional_addons/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/partner-contact.git /tmp/oca-repos/partner-contact &&\
mv /tmp/oca-repos/partner-contact/partner_firstname \
/tmp/oca-repos/partner-contact/partner_disable_gravatar \
/opt/odoo/additional_addons/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/server-tools.git /tmp/oca-repos/server-tools &&\
mv /tmp/oca-repos/server-tools/date_range \
/tmp/oca-repos/server-tools/auth_session_timeout \
/tmp/oca-repos/server-tools/auth_brute_force \
/tmp/oca-repos/server-tools/password_security \
/opt/odoo/additional_addons/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/social.git /tmp/oca-repos/social &&\
mv /tmp/oca-repos/social/mail_debrand \
/tmp/oca-repos/social/mail_restrict_follower_selection \
/opt/odoo/additional_addons/ &&\
git clone -b 10.0 --depth 1 https://github.com/OCA/web.git /tmp/oca-repos/web &&\
mv /tmp/oca-repos/web/web_environment_ribbon \
/tmp/oca-repos/web/web_export_view \
/tmp/oca-repos/web/web_responsive \
/tmp/oca-repos/web/web_timeline \
/opt/odoo/additional_addons/ &&\
rm -rf /tmp/oca-repos/ &&\
find /opt/odoo/additional_addons/*/i18n/ -type f -not -name 'fr.po' -delete &&\
chown -R odoo:odoo /opt/odoo
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /opt/odoo/etc/odoo.conf
RUN chown odoo:odoo /opt/odoo/etc/odoo.conf
# Mount /opt/odoo/data to allow restoring filestore
VOLUME ["/opt/odoo/data/"]
# Expose Odoo services
EXPOSE 8069
# Set default user when running the container
USER odoo
# Start
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]
# Metadata
ARG VCS_REF
ARG BUILD_DATE
ARG VERSION
LABEL org.label-schema.schema-version="$VERSION" \
org.label-schema.vendor=LeFilament \
org.label-schema.license=Apache-2.0 \
org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.vcs-ref="$VCS_REF" \
org.label-schema.vcs-url="https://github.com/lefilament/docker-odoo"
FROM python:3.9-slim-buster
MAINTAINER Le Filament <https://le-filament.com>
ENV APT_DEPS='build-essential libldap2-dev libpq-dev libsasl2-dev' \
LANG=C.UTF-8 \
LC_ALL=C.UTF-8 \
PGDATABASE=odoo
RUN set -x; \
apt-get update &&\
apt-get install -y --no-install-recommends \
curl \
git \
gnupg \
npm \
openssh-client &&\
echo 'deb http://apt.postgresql.org/pub/repos/apt/ buster-pgdg main' >> /etc/apt/sources.list.d/postgresql.list &&\
curl -SL https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - &&\
curl -o wkhtmltox.deb -SL https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.buster_amd64.deb &&\
echo 'ea8277df4297afc507c61122f3c349af142f31e5 wkhtmltox.deb' | sha1sum -c - &&\
apt-get update &&\
apt-get install -y --no-install-recommends ./wkhtmltox.deb &&\
apt-get install -y --no-install-recommends postgresql-client &&\
apt-get install -y --no-install-recommends ${APT_DEPS} &&\
pip3 install -r https://raw.githubusercontent.com/OCA/OCB/14.0/requirements.txt &&\
pip3 install phonenumbers simplejson gevent==20.12.1 PyYAML zxcvbn &&\
apt-get -y purge ${APT_DEPS} &&\
apt-get -y autoremove &&\
rm -rf /var/lib/apt/lists/* wkhtmltox.deb
# Add Git Known Hosts
COPY ./ssh_known_git_hosts /root/.ssh/known_hosts
# Install Odoo and remove not French translations and .git directory to limit amount of data used by container
RUN set -x; \
useradd -l --create-home --home-dir /opt/odoo --no-log-init odoo &&\
/bin/bash -c "mkdir -p /opt/odoo/{etc,odoo,additional_addons,private_addons,data,private}" &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/OCB.git /opt/odoo/odoo &&\
rm -rf /opt/odoo/odoo/.git &&\
find /opt/odoo/odoo/addons/*/i18n/ /opt/odoo/odoo/odoo/addons/base/i18n/ -type f -not -name 'fr.po' -delete &&\
chown -R odoo:odoo /opt/odoo
# Install Odoo OCA default dependencies
RUN set -x; \
mkdir -p /tmp/oca-repos/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/account-financial-reporting.git /tmp/oca-repos/account-financial-reporting &&\
mv /tmp/oca-repos/account-financial-reporting/account_tax_balance /opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/account-financial-tools.git /tmp/oca-repos/account-financial-tools &&\
mv /tmp/oca-repos/account-financial-tools/account_lock_date_update \
/opt/odoo/additional_addons/ &&\
# Comment out modules not yet migrated on OCA for v14
#git clone -b 14.0 --depth 1 https://github.com/OCA/account-invoicing.git /tmp/oca-repos/account-invoicing &&\
#mv /tmp/oca-repos/account-invoicing/sale_timesheet_invoice_description \
# /opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/bank-statement-import.git /tmp/oca-repos/bank-statement-import &&\
mv /tmp/oca-repos/bank-statement-import/account_statement_import \
/tmp/oca-repos/bank-statement-import/account_statement_import_ofx \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/partner-contact.git /tmp/oca-repos/partner-contact &&\
mv /tmp/oca-repos/partner-contact/partner_disable_gravatar \
mv /tmp/oca-repos/partner-contact/partner_firstname \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/project.git /tmp/oca-repos/project &&\
mv /tmp/oca-repos/project/project_category \
/tmp/oca-repos/project/project_status \
/tmp/oca-repos/project/project_task_default_stage \
/tmp/oca-repos/project/project_template \
/tmp/oca-repos/project/project_timeline \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/server-auth.git /tmp/oca-repos/server-auth &&\
mv /tmp/oca-repos/server-auth/password_security \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/server-brand.git /tmp/oca-repos/server-brand &&\
mv /tmp/oca-repos/server-brand/disable_odoo_online \
/tmp/oca-repos/server-brand/portal_odoo_debranding \
/tmp/oca-repos/server-brand/remove_odoo_enterprise \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/server-tools.git /tmp/oca-repos/server-tools &&\
mv /tmp/oca-repos/server-tools/base_search_fuzzy \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/server-ux.git /tmp/oca-repos/server-ux &&\
mv /tmp/oca-repos/server-ux/base_technical_features \
/tmp/oca-repos/server-ux/date_range \
/tmp/oca-repos/server-ux/mass_editing \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/social.git /tmp/oca-repos/social &&\
mv /tmp/oca-repos/social/base_search_mail_content \
/tmp/oca-repos/social/mail_debrand \
/opt/odoo/additional_addons/ &&\
git clone -b 14.0 --depth 1 https://github.com/OCA/web.git /tmp/oca-repos/web &&\
mv /tmp/oca-repos/web/web_environment_ribbon \
/tmp/oca-repos/web/web_responsive \
/tmp/oca-repos/web/web_timeline \
/opt/odoo/additional_addons/ &&\
rm -rf /tmp/oca-repos/ &&\
find /opt/odoo/additional_addons/*/i18n/ -type f -not -name 'fr.po' -delete &&\
chown -R odoo:odoo /opt/odoo
# Copy entrypoint script and Odoo configuration file
COPY ./entrypoint.sh /
COPY ./odoo.conf /opt/odoo/etc/odoo.conf
RUN chown odoo:odoo /opt/odoo/etc/odoo.conf
# Mount /opt/odoo/data to allow restoring filestore
VOLUME ["/opt/odoo/data/"]
# Expose Odoo services
EXPOSE 8069
# Set default user when running the container
USER odoo
# Start
ENTRYPOINT ["/entrypoint.sh"]
CMD ["odoo"]
# Metadata
ARG VCS_REF
ARG BUILD_DATE
ARG VERSION
LABEL org.label-schema.schema-version="$VERSION" \
org.label-schema.vendor=LeFilament \
org.label-schema.license=Apache-2.0 \
org.label-schema.build-date="$BUILD_DATE" \
org.label-schema.vcs-ref="$VCS_REF" \
org.label-schema.vcs-url="https://github.com/lefilament/docker-odoo"
......@@ -6,13 +6,13 @@ These docker images are now maintained on [Le Filament GitLab server](https://so
This Docker is inspired from the ones from [Odoo](https://github.com/odoo/docker), [Tecnativa](https://github.com/Tecnativa/doodba) and [Elico Corporation](https://github.com/Elico-Corp/odoo-docker).
It creates a functional Odoo Docker of limited size (< 400 MB), including Odoo 10.0 or 12.0 from [OCA/OCB](https://github.com/oca/ocb), and also a few addons from [OCA](https://github.com/oca).
It creates a functional Odoo Docker of limited size (< 400 MB), including Odoo 10.0 or 12.0 or 14.0 from [OCA/OCB](https://github.com/oca/ocb), and also a few addons from [OCA](https://github.com/oca).
In order to reduce as much as possible the size of the Docker, only French translations are kept and .git directories are removed.
For people needing other languages than English or French, a 12.0_ml image is also provided.
Also, some extra modules may need python 3.6 for Odoo v12 (python 3.5 by default on 12.0 image), therefore a specific 12.0_py3.6 has been created.
The following OCA addons are included by default in this image (in v14.0):
The following OCA addons are included by default in this image (in v12.0):
```yaml
- repo: account-financial-reporting
modules:
......@@ -20,13 +20,16 @@ The following OCA addons are included by default in this image (in v14.0):
- repo: account-financial-tools
modules:
- account_lock_date_update
# Not yet approved PR on v14
#- repo: account-invoicing
# modules:
# - sale_timesheet_invoice_description
- repo: account-invoicing
modules:
- sale_timesheet_invoice_description
- repo: bank-statement-import
modules:
- account_bank_statement_import_ofx
- repo: knowledge
modules:
- document_page
- knowledge
- repo: partner-contact
modules:
- partner_disable_gravatar
......@@ -38,19 +41,28 @@ The following OCA addons are included by default in this image (in v14.0):
- project_task_default_stage
- project_template
- project_timeline
- repo: sale-workflow
modules:
- partner_contact_sale_info_propagation
- partner_prospect
- repo: server-auth
modules:
- auth_session_timeout
- password_security
- repo: server-brand
modules:
- disable_odoo_online
- portal_odoo_debranding
- remove_odoo_enterprise
- repo: server-tools
modules:
- base_search_fuzzy
- repo: server-ux
modules:
- base_technical_features
- date_range
- mass_editing
- mass_operation_abstract
- repo: social
modules:
- base_search_mail_content
......@@ -58,6 +70,7 @@ The following OCA addons are included by default in this image (in v14.0):
- repo: web
modules:
- web_environment_ribbon
- web_export_view
- web_responsive
- web_timeline
```
......@@ -83,8 +96,8 @@ docker-compose example is provided below:
version: "2.1"
services:
odoo:
image: lefilament/odoo:14.0
container_name: odoo14
image: lefilament/odoo:12.0
container_name: odoo12
depends_on:
- db
tty: true
......@@ -95,8 +108,8 @@ services:
- odoo
db:
image: postgres:13-alpine
container_name: odoo14_db
image: postgres:10-alpine
container_name: odoo12_db
environment:
POSTGRES_USER: "odoo"
POSTGRES_PASSWORD: "odoo"
......
#!/bin/bash
set -ex
# Get Odoo version
version="$DOCKER_TAG"
if [ "$version" == latest ]; then
version=14.0
fi
if [ -z "$IMAGE_NAME" ]; then
IMAGE_NAME="$DOCKER_REPO:$DOCKER_TAG"
fi
time docker image build \
--build-arg VCS_REF="$GIT_SHA1" \
--build-arg BUILD_DATE="$(date --rfc-3339 ns)" \
--build-arg ODOO_VERSION="$version" \
--file "$version.Dockerfile" \
--tag "$IMAGE_NAME" \
.
#!/bin/bash
set -ex
# Get Odoo version
version="$DOCKER_TAG"
if [ "$version" == latest ]; then
version=14.0
fi
if [ -z "$IMAGE_NAME" ]; then
IMAGE_NAME="$DOCKER_REPO:$DOCKER_TAG"
fi
docker image push "$IMAGE_NAME"
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter