https://github.com/nicholaswilde/docker-odoo
A multi architecture image of Odoo.
https://github.com/nicholaswilde/docker-odoo
docker docker-image odoo
Last synced: about 2 months ago
JSON representation
A multi architecture image of Odoo.
- Host: GitHub
- URL: https://github.com/nicholaswilde/docker-odoo
- Owner: nicholaswilde
- License: apache-2.0
- Created: 2021-01-03T20:45:04.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-02-22T09:15:39.000Z (over 3 years ago)
- Last Synced: 2025-04-05T07:13:39.147Z (about 1 year ago)
- Topics: docker, docker-image, odoo
- Language: Dockerfile
- Homepage: https://hub.docker.com/repository/docker/nicholaswilde/odoo
- Size: 109 MB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# Docker Odoo
[](https://hub.docker.com/r/nicholaswilde/odoo)
[](https://hub.docker.com/r/nicholaswilde/odoo)
[](./LICENSE)
[](https://github.com/nicholaswilde/docker-odoo/actions?query=workflow%3Ayamllint)
[](https://github.com/nicholaswilde/docker-odoo/actions?query=workflow%3Ahadolint)
[](https://github.com/nicholaswilde/docker-odoo/actions?query=workflow%3Aci)
[](https://github.com/pre-commit/pre-commit)
A multi architecture image of [Odoo](https://www.odoo.com/).
## Dependencies
* postgres
## Usage
This image requires a running PostgreSQL server.
# Start a PostgreSQL server
```console
$ docker run -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo -e POSTGRES_DB=postgres --name db postgres:10
```
# Start an Odoo instance
```console
$ docker run -p 8069:8069 --name nicholaswilde/odoo --link db:db -t odoo
```
The alias of the container running Postgres must be db for Odoo to be able to connect to the Postgres server.
# Docker Compose examples
The simplest `docker-compose.yml` file would be:
```yml
version: '2'
services:
web:
image: odoo:14.0-ls1
depends_on:
- db
ports:
- "8069:8069"
db:
image: postgres:10
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
```
If the default postgres credentials does not suit you, tweak the environment variables:
```yml
version: '2'
services:
web:
image: nicholaswilde/odoo:14.0-ls1
depends_on:
- mydb
ports:
- "8069:8069"
environment:
- HOST=mydb
- USER=odoo
- PASSWORD=myodoo
mydb:
image: postgres:10
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=myodoo
- POSTGRES_USER=odoo
```
Here's a last example showing you how to mount custom addons, how to use a custom configuration file and how to use volumes for the Odoo and postgres data dir:
```yml
version: '2'
services:
web:
image: nicholaswilde/odoo:14.0
depends_on:
- db
ports:
- "8069:8069"
volumes:
- odoo-web-data:/var/lib/odoo
- ./config:/etc/odoo
- ./addons:/mnt/extra-addons
db:
image: postgres:10
environment:
- POSTGRES_DB=postgres
- POSTGRES_PASSWORD=odoo
- POSTGRES_USER=odoo
- PGDATA=/var/lib/postgresql/data/pgdata
volumes:
- odoo-db-data:/var/lib/postgresql/data/pgdata
volumes:
odoo-web-data:
odoo-db-data:
```
To start your Odoo instance, go in the directory of the `docker-compose.yml` file you created from the previous examples and type:
```console
docker-compose up -d
```
## Development
See [Wiki](https://github.com/nicholaswilde/docker-template/wiki/Development).
## Troubleshooting
See [Wiki](https://github.com/nicholaswilde/docker-template/wiki/Troubleshooting).
## Pre-commit hook
If you want to automatically generate `README.md` files with a pre-commit hook, make sure you
[install the pre-commit binary](https://pre-commit.com/#install), and add a [.pre-commit-config.yaml file](./.pre-commit-config.yaml)
to your project. Then run:
```bash
pre-commit install
pre-commit install-hooks
```
Currently, this only works on `arm64` systems.
## Inspiration
Inspiration for this respository has been taken from [odoo/docker](https://github.com/odoo/docker)
## License
[Apache 2.0 License](./LICENSE)
## Author
This project was started in 2020 by [Nicholas Wilde](https://github.com/nicholaswilde/).