Skip to content

feat: improve configure command#2

Merged
hailangvn merged 1 commit intomainfrom
imp-deploy
Mar 26, 2026
Merged

feat: improve configure command#2
hailangvn merged 1 commit intomainfrom
imp-deploy

Conversation

@hailangvn
Copy link
Copy Markdown
Collaborator

@hailangvn hailangvn commented Mar 23, 2026

  • working dir and executable path in unit config file need to be absolute so home_dir is required and should be absolute. It replaces $HOME environment variable.
  • have git aggregator support for addons
  • use odoo-addons-path in unit config file to detect addons paths instead of hard-coding
  • allow file path for python type in addition of module path for python
  • update command now uses odoo-venv update with backup flag

Depends on:

Forge ID: F#T67348

Comment thread deploy/templates/python.service.j2 Outdated
Type=simple
WorkingDirectory={{ instance_path }}
ExecStart={{ venv_path }}/bin/python -m {{ exec_start }}
ExecStart={{ venv_path }}/bin/python {{ exec_entry }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
ExecStart={{ venv_path }}/bin/python {{ exec_entry }}
ExecStart={{ venv_path }}/bin/{{ exec_entry }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

after second thought, I think it's better to give more freedom there
e.g. for a fastapi app, might run fastapi binary directly

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your review. This has been updated.

@hailangvn hailangvn force-pushed the imp-deploy branch 2 times, most recently from 952fe15 to 9e356bb Compare March 24, 2026 03:50
Comment thread deploy/command/configure.py Outdated
Comment on lines +128 to +134
odoo_addons_path = executor.capture("which odoo-addons-path")
template_vars["odoo_addons_path"] = odoo_addons_path
odoo_path = executor.capture(
"odoo-addons-path odoo-path .",
cwd=instance_path,
)
template_vars["odoo_path"] = odoo_path
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@hailangvn if we assume that odoo-venv installed odoo properly, then can't we just rely on the bin/odoo installed in the venv? as does @trisdoan in trobz/odoo-venv#68

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for your review. The PR has been updated.

- working dir and executable path in unit config file need to be
  absolute so home_dir is required and should be absolute. It replaces
  $HOME environment variable.
- have git aggregator support for addons
- use odoo-addons-path in unit config file to detect addons paths instead
  of hard-coding
- allow file path for python type in addition of module path for python
- update command now uses odoo-venv update with backup flag

Forge ID: F#T67348
@hailangvn hailangvn merged commit 9d5d249 into main Mar 26, 2026
5 checks passed
@hailangvn hailangvn deleted the imp-deploy branch March 26, 2026 07:57
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.

2 participants