From b415303cecb1c6d43d6e54ffa5370accfebcf29e Mon Sep 17 00:00:00 2001 From: Alexander Bigga Date: Mon, 2 Jan 2023 10:24:29 +0100 Subject: [PATCH] Add readme how to build docker image and use it with docker-compose --- 15.0/.gitignore | 1 + 15.0/README.md | 81 +++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 82 insertions(+) create mode 100644 15.0/.gitignore create mode 100644 15.0/README.md diff --git a/15.0/.gitignore b/15.0/.gitignore new file mode 100644 index 0000000..300b677 --- /dev/null +++ b/15.0/.gitignore @@ -0,0 +1 @@ +odoo.deb diff --git a/15.0/README.md b/15.0/README.md new file mode 100644 index 0000000..5b357c3 --- /dev/null +++ b/15.0/README.md @@ -0,0 +1,81 @@ +# Build Odoo docker image from Debian package + +The Dockerfile has been modified to use a local Odoo Debian package to install to the docker container. + +## Steps to build docker image + +1. Fetch the odoo debian package from https://odoo.com/download + * for the enterprise version, you need to login to your Odoo account! +2. Rename the downloaded file to `odoo.deb` and place it in this directory. +3. Create the docker image `my-odoo-15` with the following command: + +``` +docker build -t my-odoo-15 . +``` + +## Use the docker image + +The following docker-compose file will create three containers: +* odoo15-web-live-1 --> the Odoo container itself +* odoo15-db-live-1 --> the database (postgresql 13) +* docker-odoo15-mailhog-1 --> mailhog instance +* docker-odoo15-adminer-1 --> adminer instance + +``` +version: '3.1' +services: + web: + container_name: odoo15-web-live-1 + image: my-odoo-15:latest + depends_on: + - db + ports: + - 8269:8069 + command: -- --dev=all + volumes: + - odoo15-data-live:/var/lib/odoo + - ./config:/etc/odoo + - ./addons:/mnt/extra-addons + db: + container_name: odoo15-db-live-1 + image: postgres:13 + environment: + - POSTGRES_DB=postgres + - POSTGRES_PASSWORD=odoo + - POSTGRES_USER=odoo + volumes: + - odoo15-db-data-live:/var/lib/postgresql/data + mailhog: + image: mailhog/mailhog + ports: + - 1225:1025 # smtp server + - 8227:8025 # web ui + adminer: + image: adminer + #restart: always + ports: + - 8282:8080 +volumes: + odoo15-db-data-live: + odoo15-data-live: +``` + +## Access the web interfaces + +Ports for the web access can be configured in the docker-compose file. + +### Odoo + +http://localhost:8269/ + +### Adminer (Postgresql) + +http://localhost:8282/ + +* select database system "PostgreSQL" +* Server: db +* Username: odoo +* Password: odoo +* Database: empty + +### Mailhog