Skip to content

Commit 780a054

Browse files
committed
Odoo: update documentation for the latest version
* adapt Odoo and Postgresql versions * add a note about enterprise addons * fix upgrade links * remove wrong information about attachments storage
1 parent 3108095 commit 780a054

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

odoo/content.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ This image requires a running PostgreSQL server.
1313
## Start a PostgreSQL server
1414

1515
```console
16-
$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:13
16+
$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:15
1717
```
1818

1919
## Start an Odoo instance
@@ -27,16 +27,16 @@ The alias of the container running Postgres must be db for Odoo to be able to co
2727
## Stop and restart an Odoo instance
2828

2929
```console
30-
$ docker stop odoo
31-
$ docker start -a odoo
30+
$ docker stop %%IMAGE%%
31+
$ docker start -a %%IMAGE%%
3232
```
3333

3434
## Use named volumes to preserve data
3535

3636
When the Odoo container is created like described above, the odoo filestore is created inside the container. If the container is removed, the filestore is lost. The preferred way to prevent that is by using a Docker named [volume](https://docs.docker.com/storage/volumes/).
3737

3838
```console
39-
$ docker run -v odoo-data:/var/lib/odoo -d -p 8069:8069 --name odoo --link db:db -t odoo
39+
$ docker run -v odoo-data:/var/lib/odoo -d -p 8069:8069 --name odoo --link db:db -t %%IMAGE%%
4040
```
4141

4242
With the above command, the volume named `odoo-data` will persist even if the container is removed and can be re-used by issuing the same command.
@@ -46,7 +46,7 @@ The path `/var/lib/odoo` used as the mount point of the volume must match the od
4646
Note that the same principle applies to the Postgresql container and a named volume can be used to preserve the database when the container is removed. So the database container could be started like this (before the odoo container):
4747

4848
```console
49-
$ docker run -d -v odoo-db:/var/lib/postgresql/data -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:13
49+
$ docker run -d -v odoo-db:/var/lib/postgresql/data -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:15
5050
```
5151

5252
## Stop and restart a PostgreSQL server
@@ -63,7 +63,7 @@ The default configuration file for the server (located at `/etc/odoo/odoo.conf`)
6363
$ docker run -v /path/to/config:/etc/odoo -p 8069:8069 --name odoo --link db:db -t %%IMAGE%%
6464
```
6565

66-
Please use [this configuration template](https://github.com/odoo/docker/blob/master/14.0/odoo.conf) to write your custom configuration as we already set some arguments for running Odoo inside a Docker container.
66+
Please use [this configuration template](https://github.com/odoo/docker/blob/master/16.0/odoo.conf) to write your custom configuration as we already set some arguments for running Odoo inside a Docker container.
6767

6868
You can also directly specify Odoo arguments inline. Those arguments must be given after the keyword `--` in the command-line, as follows
6969

@@ -79,14 +79,16 @@ You can mount your own Odoo addons within the Odoo container, at `/mnt/extra-add
7979
$ docker run -v /path/to/addons:/mnt/extra-addons -p 8069:8069 --name odoo --link db:db -t %%IMAGE%%
8080
```
8181

82+
**Note:** Altough there is no official Odoo Enterprise Docker image, the Enterprise modules can be mounted by using the above mentionned method.
83+
8284
## Run multiple Odoo instances
8385

8486
```console
8587
$ docker run -p 8070:8069 --name odoo2 --link db:db -t %%IMAGE%%
8688
$ docker run -p 8071:8069 --name odoo3 --link db:db -t %%IMAGE%%
8789
```
8890

89-
Please note that for plain use of mails and reports functionalities, when the host and container ports differ (e.g. 8070 and 8069), one has to set, in Odoo, Settings->Parameters->System Parameters (requires technical features), web.base.url to the container port (e.g. 127.0.0.1:8069).
91+
**Note:** For plain use of mails and reports functionalities, when the host and container ports differ (e.g. 8070 and 8069), one has to set, in Odoo, `Settings->Parameters->System Parameters` (requires technical features), web.base.url to the container port (e.g. 127.0.0.1:8069).
9092

9193
## Environment Variables
9294

@@ -105,13 +107,13 @@ The simplest `docker-compose.yml` file would be:
105107
version: '3.1'
106108
services:
107109
web:
108-
image: %%IMAGE%%:14.0
110+
image: %%IMAGE%%:16.0
109111
depends_on:
110112
- db
111113
ports:
112114
- "8069:8069"
113115
db:
114-
image: postgres:13
116+
image: postgres:15
115117
environment:
116118
- POSTGRES_DB=postgres
117119
- POSTGRES_PASSWORD=odoo
@@ -124,7 +126,7 @@ If the default postgres credentials does not suit you, tweak the environment var
124126
version: '3.1'
125127
services:
126128
web:
127-
image: %%IMAGE%%:14.0
129+
image: %%IMAGE%%:16.0
128130
depends_on:
129131
- mydb
130132
ports:
@@ -134,7 +136,7 @@ services:
134136
- USER=odoo
135137
- PASSWORD=myodoo
136138
mydb:
137-
image: postgres:13
139+
image: postgres:15
138140
environment:
139141
- POSTGRES_DB=postgres
140142
- POSTGRES_PASSWORD=myodoo
@@ -152,7 +154,7 @@ Here's a last example showing you how to
152154
version: '3.1'
153155
services:
154156
web:
155-
image: %%IMAGE%%:14.0
157+
image: %%IMAGE%%:16.0
156158
depends_on:
157159
- db
158160
ports:
@@ -166,7 +168,7 @@ services:
166168
secrets:
167169
- postgresql_password
168170
db:
169-
image: postgres:13
171+
image: postgres:15
170172
environment:
171173
- POSTGRES_DB=postgres
172174
- POSTGRES_PASSWORD_FILE=/run/secrets/postgresql_password
@@ -193,14 +195,12 @@ docker-compose up -d
193195

194196
# How to upgrade this image
195197

196-
Odoo images are updated on a regular basis to make them use recent releases (a new release of each version of Odoo is built [every night](http://nightly.odoo.com/)). Please be aware that what follows is about upgrading from an old release to the latest one provided of the same major version, as upgrading from a major version to another is a much more complex process requiring elaborated migration scripts (see [Odoo Enterprise Upgrade page](https://upgrade.odoo.com/database/upload) or this [community project](https://doc.therp.nl/openupgrade/) which aims to write those scripts).
198+
Odoo images are updated on a regular basis to make them use recent releases (a new release of each version of Odoo is built [every night](http://nightly.odoo.com/)). Please be aware that what follows is about upgrading from an old release to the latest one provided of the same major version, as upgrading from a major version to another is a much more complex process requiring elaborated migration scripts (see [Odoo Upgrade page](https://upgrade.odoo.com) or this [community project](https://github.com/OCA/OpenUpgrade) which aims to write those scripts).
197199

198200
Suppose you created a database from an Odoo instance named old-odoo, and you want to access this database from a new Odoo instance named new-odoo, e.g. because you've just downloaded a newer Odoo image.
199201

200-
By default, Odoo 14.0 uses a filestore (located at /var/lib/odoo/filestore/) for attachments. You should restore this filestore in your new Odoo instance by running
202+
By default, Odoo 16.0 uses a filestore (located at `/var/lib/odoo/filestore/`) for attachments. You should restore this filestore in your new Odoo instance by running
201203

202204
```console
203205
$ docker run --volumes-from old-odoo -p 8070:8069 --name new-odoo --link db:db -t %%IMAGE%%
204206
```
205-
206-
You can also simply prevent Odoo from using the filestore by setting the system parameter `ir_attachment.location` to `db-storage` in Settings->Parameters->System Parameters (requires technical features).

0 commit comments

Comments
 (0)