Skip to content

Conversation

@luisg123v
Copy link
Contributor

The entrypoint used for DeployV-based projects now automatically fixes ownership for files in /home/odoo that cannot be adjusted at build time because some paths are declared as volumes in the parent DeployV images (e.g. ~/.ssh).

It also starts an interactive shell (bash) when START_ODOO=0, so it is no longer required to override the entrypoint with --entrypoint bash when running t2d for development purposes.

Closes #217

The entrypoint used for DeployV-based projects now automatically fixes
ownership for files in `/home/odoo` that cannot be adjusted at build
time because some paths are declared as volumes in the parent DeployV
images (e.g. `~/.ssh`).

It also starts an interactive shell (`bash`) when `START_ODOO=0`, so
it is no longer required to override the entrypoint with
`--entrypoint bash` when running `t2d` for development purposes.

Closes Vauxoo#217
@luisg123v
Copy link
Contributor Author

Hi @moylop260,

What do you think about this approach?

Regards,

CC @desdelinux @NicolasOT

start_ssh()
start_psql()
start_odoo()
start_bash()
Copy link
Collaborator

@moylop260 moylop260 Jul 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

start_odoo is not starting and odoo without --stop-after-init

Then you will use a ctrl+C to stop it

So, start_bash will not be even executed

Also, when you have already generated the container (stop and start)
it is using the odoo user and it will not have permissions to change the files permissions (That is the main problem)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@moylop260

This flow is as follows:

  • Run as root
  • Fix permissions
  • Start SSH service (optional and only when run as root)
  • Start PSQL service (optional)
  • Then, using the odoo user, either:
    • Start the Odoo service
    • Or enter in interactive mode, i.e. launch the shell

The idea is to avoid having to pass --entrypoint=bash in order to use the container for developments, we would just need to ask the container to don't start the Odoo service automatically, which will launch the shell.

Regarding this:

start_odoo is not starting and odoo without --stop-after-init

The entrypoint adds --stop-after-init to the Odoo command whenever creating a new database (I didn't change that). Besides, when launching the shell, the Odoo service is not started anyway.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@luisg123v

Do you think this affects runbot?

I mean, runbot run 3 steps:

  1. Build docker image
  2. Run container with Odoo start to install modules
  3. Run container with Odoo start odoo without stop to let it alive

@moylop260
Copy link
Collaborator

@luisg123v

I'm using locally this change and after using docker exec or 20-run.sh the user used is root

All the time it has been avoided in order to use only odoo user since that in the past the developer has too many issues reported because sometimes they start odoo with root and sometimes with odoo OS user and the filestore was not working well

We have fixed using the current way where only an user is used to work

This is a small technical change but big functional change for our developers

You could think that it should not generate issues because of our developers should to know this but trust me when I say you it generated too many calls to me to help to fix these kind of issues

Also, runbot is using ssh services to connect to this instances but the root OS user is not a good idea to use by default in this case since that it will allow to install packages and so on

Odoo is limited

@luisg123v
Copy link
Contributor Author

@moylop260 I think those are good points.

What do you think about reviewing this on a synchronous call?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove message "you will need to run the following extra step manually"

2 participants