Help me please! Deploy odoo with Rancher UI

Help me please. I want to run the application odoo with rancher UI, all on the UI shows well. But the application is not visible from the outside (not running). Prompt please, thank you!

Odoo docker
I made such commands



but I get the following message when I run the application


Help me if you can see where I made a mistake. Thank you!

You can read more about how to use the postgres image in Docker.

The link should be - db:postgres. The service alias needs to be postgres.

I did, but the application does not run

Try using it without the POSTGRES_USER: odoo in your db since you are not accessing the specific user when linking your odoo application to postgres.

This is not led to success. It got me thinking. I tried to enter through the shell into the container. I could not copy and paste anything.
And how to enter into the container to find out what’s going on?

Maybe is this a question for another topic?

Regarding odoo application I’m still in a quandary.

Most likely I can not connect or start postgres. :disappointed:

What do you see in the logs?

Now I’m at the stage - how to get into the container Postgres and find out it? :smile:

docker-compose logs db


docker-compose run db /bin/bash

Hi @111, It looks like your configurations are correct, though the second configuration db:postgres is incorrect, it looks like the Odoo image looks for a db link. I noticed that the docker page had tty (-t) enabled, but I was able to get it to run with and without it.

Another thing I ran into on the Postgres docker image page, was that postgres might not be immediately available for connections. You can check the logs from the UI by clicking on the circle menu on the container. When postgres starts it should say something like:

2015-09-18T20:51:39.972203882Z LOG: database system is ready to accept connections

at the end. If you can see that message, then I would suspect that Odoo can not talk to the db.

To enter a container, log into the host it is running on and run docker exec -it <container id> bash

Keep us posted.

Yes, I just got the message:

How do I have to do?

In theory now, the PostgresDB is ready to accept connections. You should be able to link the Odoo container now. Please include a screenshot of the Odoo logs if you can.

I restarted the service:

Postgres logs:

Odoo logs:

Can you try bringing it up in a two stage approach?

rancher-compose -p odoo up db

wait until you see the “started and ready message”

Then run
rancher-compose -p odoo up odoo

I’m wondering if there is just a timing issue between the services.
Also, can you confirm that your cross host networking is functioning? Create a container on two separate hosts and link them manually through the UI. Make sure you can ping them.

I launched the application Odoo, as Standalone Containers:

docker run --name db -d -e POSTGRES_USER=odoo -e POSTGRES_PASSWORD=odoo postgres

docker run --name odoo -d -p 80:8069 --link db:db odoo

I copy the settings in the stack, but the application does not run as before.

Is it possible to clone containers from Standalone Containers to Stack?

Using the Rancher UI, I was able to create the services based on the commands that you provided and was able to access Odoo.

Here’s my docker-compose.yml. With the latest release (v0.41.0), you should be able to import it through the “Add Stack” button.

  restart: always
  tty: true
  image: postgres
  stdin_open: true
  - 80:8069/tcp
  restart: always
  tty: true
  image: odoo
  - db:db
  stdin_open: true

As @cloudnautique mentioned, if you have multiple hosts, it sounds as if you are having issues with containers not being able to communicate on different hosts. Please read our FAQs on troubleshooting to see if that can help solve that issue.

It is awesome! Just perfect! :saxophone: I am very grateful to denise and cloudnautique for your help! :beers:

where I can specify the version of the image (eg Odoo 9)?

It looks like latest is 9.0, but typically you can specify the tag as part of image name.


1 Like

A lot of thanks @denise!