Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
59 changes: 29 additions & 30 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "master"
- "dev"
tags:
- "*.*.*.*.*"
- "*.*.*"
- "stable"

pull_request:
Expand All @@ -17,7 +17,6 @@ on:
schedule:
- cron: "0 1 * * THU"


env:
TARGET: GHCR
DOCKER_BUILDKIT: 1
Expand All @@ -42,41 +41,41 @@ jobs:
python_from: "python:3.9-slim-trixie"

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v4
with:
driver: docker

- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v4
uses: docker/metadata-action@v6
with:
images: ghcr.io/camptocamp/docker-odoo-project
flavor: |
prefix=${{ matrix.odoo_serie }}-,onlatest=true
prefix=${{ matrix.odoo_serie }}-,onlatest=true
tags: |
type=raw,value={{branch}}-latest
type=raw,value={{branch}}-{{date 'YYYYMMDD'}}
type=ref,event=tag
type=ref,event=pr
type=schedule,pattern={{branch}}-nightly
type=raw,value={{branch}}
type=raw,value={{branch}}-latest
type=raw,value={{branch}}-{{date 'YYYYMMDD'}}
type=ref,event=tag
type=ref,event=pr
type=schedule,pattern={{branch}}-nightly
type=raw,value={{branch}}

- name: Setup build dir
run: |
VERSION=${{ matrix.odoo_serie }} SRC=build make setup

- name: Build
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ./build
build-args: |
VERSION=${{ matrix.odoo_serie }}
VERSION=${{ matrix.odoo_serie }}
build-contexts: |
python=docker-image://${{ matrix.python_from }}
python=docker-image://${{ matrix.python_from }}
push: false
load: true
tags: ci-5xx-latest:${{ matrix.odoo_serie }}
Expand All @@ -85,35 +84,35 @@ jobs:
- name: Test
run: make VERSION=${{ matrix.odoo_serie }} test

- name: Scan image
id: scan
uses: sysdiglabs/scan-action@v6
with:
sysdig-secure-url: https://eu1.app.sysdig.com
stop-on-failed-policy-eval: false
stop-on-processing-error: false
image-tag: ci-5xx-latest:${{ matrix.odoo_serie }}
skip-upload: false
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}

- name: Login to GitHub Container Registry
if: github.event_name == 'push' || github.event_name == 'schedule'
uses: docker/login-action@v2
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USER }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Scan image
id: scan
uses: sysdiglabs/scan-action@v6.1.3
with:
sysdig-secure-url: https://eu1.app.sysdig.com
stop-on-failed-policy-eval: false
stop-on-processing-error: false
image-tag: ci-5xx-latest:${{ matrix.odoo_serie }}
skip-upload: false
sysdig-secure-token: ${{ secrets.SYSDIG_SECURE_TOKEN }}

- name: Tag & Push
if: github.event_name == 'push' || github.event_name == 'schedule'
id: docker_push
uses: docker/build-push-action@v6
uses: docker/build-push-action@v7
with:
context: ./build
build-args: |
VERSION=${{ matrix.odoo_serie }}
VERSION=${{ matrix.odoo_serie }}
build-contexts: |
python=docker-image://${{ matrix.python_from }}
python=docker-image://${{ matrix.python_from }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.docker_meta.outputs.tags }}
labels: ${{ steps.docker_meta.outputs.labels }}
Expand Down
1 change: 1 addition & 0 deletions 14.0/base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ xlrd==1.2.0; python_version >= '3.8'
zope.event==5.0
zope.interface==8.0


whool==1.2.0
# Not part of official requirements, but used by some addons
# colorama==0.3.9
Expand Down
3 changes: 0 additions & 3 deletions 14.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# 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
3 changes: 2 additions & 1 deletion 15.0/base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ lxml-html-clean; python_version >= '3.12' # (Noble - removed from lxml, unpinned
MarkupSafe==2.1.5 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
num2words==0.5.6
ofxparse==0.21; python_version > '3.9' # (Jammy)
Pillow==12.1.1 # upstream: 10.3.0
Pillow==12.1.1 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
polib==1.1.0
psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
psycopg2==2.9.9 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
Expand Down Expand Up @@ -43,6 +43,7 @@ zeep==3.4.0
zope.event==5.1.1
zope.interface==8.0


whool==1.2.0
# Not part of official requirements, but used by some addons
# colorama==0.3.9
Expand Down
3 changes: 0 additions & 3 deletions 15.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# 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
3 changes: 2 additions & 1 deletion 16.0/base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ MarkupSafe==2.1.5 ; python_version >= '3.12' # (Noble) Mostly to have a wheel p
num2words==0.5.9
ofxparse==0.21; python_version > '3.9' # (Jammy)
passlib==1.7.4 # min version = 1.7.2 (Focal with security backports)
Pillow==12.1.1 # upstream: 10.3.0
Pillow==12.1.1 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
polib==1.1.0
psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
psycopg2==2.9.9 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
Expand Down Expand Up @@ -47,6 +47,7 @@ zeep==4.0.0
zope.event==5.1.1
zope.interface==8.0


# Not part of official requirements, but used by some addons
# colorama==0.3.9
gdata==2.0.18
Expand Down
3 changes: 0 additions & 3 deletions 16.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# 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
3 changes: 2 additions & 1 deletion 17.0/base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ num2words==0.5.13 ; python_version >= '3.12'
ofxparse==0.21
openpyxl==3.1.2 ; python_version >= '3.12'
passlib==1.7.4 # min version = 1.7.2 (Focal with security backports)
Pillow==12.1.1 # upstream: 10.3.0
Pillow==12.1.1 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
polib==1.1.0
psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
psycopg2==2.9.9 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
Expand Down Expand Up @@ -48,6 +48,7 @@ zeep==4.2.1 ; python_version >= '3.11'
zope.event==5.1.1
zope.interface==8.0


# Not part of official requirements, but used by some addons
# colorama==0.3.9
gdata==2.0.18
Expand Down
3 changes: 0 additions & 3 deletions 17.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# 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
3 changes: 2 additions & 1 deletion 18.0/base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ num2words==0.5.13 ; python_version >= '3.12'
ofxparse==0.21
openpyxl==3.1.2 ; python_version >= '3.12'
passlib==1.7.4 # min version = 1.7.2 (Focal with security backports)
Pillow==12.1.1 # upstream: 10.3.0
Pillow==12.1.1 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
polib==1.1.1
psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
psycopg2==2.9.9 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
Expand Down Expand Up @@ -50,6 +50,7 @@ zeep==4.2.1 ; python_version >= '3.11'
zope.event==5.1.1
zope.interface==8.0


# Not part of official requirements, but used by some addons
# colorama==0.3.9
gdata==2.0.18
Expand Down
3 changes: 0 additions & 3 deletions 18.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# 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
3 changes: 2 additions & 1 deletion 19.0/base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ num2words==0.5.13 ; python_version >= '3.12'
ofxparse==0.21
openpyxl==3.1.2 ; python_version >= '3.12'
passlib==1.7.4 # min version = 1.7.2 (Focal with security backports)
Pillow==12.1.1 # upstream: 10.3.0
Pillow==12.1.1 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
polib==1.1.1
psutil==5.9.8 ; python_version >= '3.12' # (Noble) Mostly to have a wheel package
psycopg2==2.9.9 ; python_version >= '3.12' and python_version < '3.13' # (Noble)
Expand Down Expand Up @@ -53,6 +53,7 @@ zeep==4.3.1 ; python_version >= '3.13'
zope.event==6.0
zope.interface==8.0


# Not part of official requirements, but used by some addons
# colorama==0.3.9
gdata==2.0.18
Expand Down
3 changes: 0 additions & 3 deletions 19.0/src_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# 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
1 change: 1 addition & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -562,6 +562,7 @@ if the image, without onbuild instructions, with onbuild and full.

* Reduce size of the 11.0 image by cleaning and optimizing layers


2.5.0 (2018-01-11)
++++++++++++++++++

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ifndef VERSION
VERSION=18.0
$(error VERSION is not set)
endif

IMAGE_LATEST=ci-5xx-latest:${VERSION}
Expand Down
32 changes: 15 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ KWKHTMLTOPDF_SERVER_URL=<url of your KWKHTMLTOPDF server>:<port>
and you also need to specify report url to let kwkhtmltopdf server to retrive images/header etc... from odoo:

```
ODOO_REPORT_URL=<url of you odoo:8069>
ODOO_REPORT_URL=<url of your odoo:8069>
```

## ⚠️ Images moved to ghcr.io
Expand All @@ -46,7 +46,7 @@ https://github.com/camptocamp/docker-odoo-project/pkgs/container/odoo-project

## Image Flavors

There are 4 flavors of the image:
There are 1 flavor of the image:

- normal: `odoo-project:${odoo_version}-${tag_version}`

Expand All @@ -61,18 +61,16 @@ The images should be build with `make`:
Normal flavors:

```
# generate image camptocamp/odoo-project:11.0-latest and camptocamp/odoo-project:11.0-latest
$ make VERSION=11.0
# generate image camptocamp/odoo-project:10.0-latest and camptocamp/odoo-project:10.0-latest
$ make VERSION=10.0
$ make VERSION=19.0
$ make VERSION=18.0
```

## Configuration

The host for the database is in `$DB_HOST` (`db` by default).

A volume `/data/odoo` is declared, which is expected to contain Odoo's filestore
(this path is set in `openerp.cfg`).
(this path is set in `odoo.cfg`).

Ports 8069 and 8072 are exposed by default.

Expand All @@ -88,13 +86,13 @@ value, the configuration parameters will be left unchanged.
### ODOO_REPORT_URL

The `ir.config_parameter` `report.url` will be automatically set to this
domain when the container starts..
domain when the container starts.
Default url is `http://localhost:8069`. As soon as we use kwkhtmltopdf
we must set this URL to be accessible by you kwkhtmltopdf server

### KWKHTMLTOPDF_SERVER_URL

It point to the server that host the kwktmltopdf server to serve files
It points to the server that host the kwktmltopdf server to serve files


### MIGRATE
Expand Down Expand Up @@ -129,11 +127,11 @@ one `MARABUNTA_MODE=full`.

By default, [Marabunta](https://github.com/camptocamp/marabunta) does not allow
to execute more than one version upgrade at a time. This is because it is
dangerous to execute a migration script (say 9.1.0) if the version of the code
is not the same (say 9.2.0).
dangerous to execute a migration script (say 19.1.0) if the version of the code
is not the same (say 19.2.0).

For a production server, it works, because usually you only want to upgrade to
the last version N from N-1. But for development or a test server, you might
the last version N from N-1. But for development or a test server, you might
want to take the risk of running all the migration scripts consecutively, this
is what `MARABUNTA_ALLOW_SERIE=True` is for.

Expand Down Expand Up @@ -234,16 +232,16 @@ It will load a dump lower than "odoo_sample_$MIG_LOAD_VERSION_CEIL.dmp"
This is useful if you bumped odoo/VERSION as it won't match existing
dumps.

For instance you have made a dump 10.1.0, you are now on the version
10.2.0, if you pass your current version it will search for a dump
lower than 10.2.0 and restore the 10.1.0. Then play the remaining
For instance you have made a dump 19.1.0, you are now on the version
19.2.0, if you pass your current version it will search for a dump
lower than 19.2.0 and restore the 19.1.0. Then play the remaining
steps on top of it.

### Odoo Configuration Options

The main configuration options of Odoo can be configured through environment variables. The name of the environment variables are the same of the options but uppercased (eg. `workers` becomes `WORKERS`).

Look in [11.0/templates/odoo.cfg.tmpl](11.0/templates/odoo.cfg.tmpl) to see the full list.
Look in [19.0/templates/odoo.cfg.tmpl](19.0/templates/odoo.cfg.tmpl) to see the full list.

While most of the variables can be set in the `docker-compose.yml` file so we can have different values for different environments, the `ADDONS_PATH` **must** be set in the `Dockerfile` of your project with a line such as:

Expand Down Expand Up @@ -307,7 +305,7 @@ docker compose run --rm odoo dropdb testdb


Pytest uses a plugin (https://github.com/camptocamp/pytest-odoo) that corrects the
Odoo namespaces (`openerp.addons`/`odoo.addons`) when running the tests.
Odoo namespaces (`odoo.addons`) when running the tests.

### pytest-cov

Expand Down
Loading
Loading