-
-
Notifications
You must be signed in to change notification settings - Fork 33
[14.0] OCA' Odoo instance docker image #59
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
6bf9761 to
a3856d7
Compare
a3856d7 to
51693c9
Compare
sbidoul
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
86fa5e1 to
ced8c47
Compare
db256a2 to
5132b06
Compare
petrus-v
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sbidoul I think we are pretty closed to get it.
I'm not sure how to properly build the image that would contains un-merged dependencies, but it's probably better practice to wait to get it merged before deploy in production (I'll try to help there in vertical-association)!!
28507bc to
83b218a
Compare
|
In the Dockerfile, we could add an entry point that runs A potential starting point: https://github.com/acsone/acsone-odoo-project-template/blob/master/src/container/entrypoint-dbbase.jinja |
odoo neutralizes is availaible from version 16.0, do you mean using @hbrunn's PR OCA/server-backend#346 ? |
| # purpose it to test update entrypoints | ||
| docker compose up --wait odoo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not strictly necessary and takes some time likes -u all. This test some how 000_10_odoo-update entry point with a database installed (it not strictly assert that the update has been done). While the -i oca_all test without odoo database!
Any opinion on this?
I meant a minimal custom script to disable the crons and mail servers. Anonymization can come on top but I'd apply that manually? |
In fact hbrunn's works is about anonymization, not neutralization. So I'm going to start a dedicated script to at least deactivate emails and crons. And I believes that we should keep neutralisation as sql (likes in later odoo version) in order to execute them before update! So at the end we will go with: neutralization (if not prod) > update > anonymization (if not prod) |
|
I've missed your comment you made before mine, Sorry I'm feeling noisy,
sometimes I think loudly...
This commit is a proposition to neutralize the database
209f665
Those SQL script cames and are adapted from Odoo 18.
I'm wondering if there are some thing to do with github connector, as far I
can read github token is in config file so I guess it's safe as long
production token wouldn't be in other environements
Le lun. 31 mars 2025 à 09:30, Stéphane Bidoul ***@***.***> a
écrit :
… @sbidoul <https://github.com/sbidoul>
and neutralizes the database if we are in a non-prod environment.
odoo neutralizes is availaible from version 16.0, do you mean using
@hbrunn <https://github.com/hbrunn>'s PR OCA/server-backend#346
<OCA/server-backend#346> ?
I meant a minimal custom script to disable the crons and mail servers.
Anonymization can come on top but I'd apply that manually?
—
Reply to this email directly, view it on GitHub
<#59 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBAYOZI3R2VDUQRHFEF5632XDVILAVCNFSM6AAAAABZF4VPW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRVGM2TQMJVG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
[image: sbidoul]*sbidoul* left a comment (OCA/oca-custom#59)
<#59 (comment)>
@sbidoul <https://github.com/sbidoul>
and neutralizes the database if we are in a non-prod environment.
odoo neutralizes is availaible from version 16.0, do you mean using
@hbrunn <https://github.com/hbrunn>'s PR OCA/server-backend#346
<OCA/server-backend#346> ?
I meant a minimal custom script to disable the crons and mail servers.
Anonymization can come on top but I'd apply that manually?
—
Reply to this email directly, view it on GitHub
<#59 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABBAYOZI3R2VDUQRHFEF5632XDVILAVCNFSM6AAAAABZF4VPW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDONRVGM2TQMJVG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
--
Pierre
|
This comment was marked as outdated.
This comment was marked as outdated.
|
This is looking good. Thanks a lot for this work! About the tagging strategy, my usual approach is to create version-like git tags and corresponding image tags. To deploy, it is then just a matter of updating the tag in docker-compose.yml or some associated .env file. And when a version is deemed good for production, do the same update in prod. That said, I have no real preference on that strategy for the OCA instance, so your proposal is good to me too. |
|
I've changed a bit my mind because in my previous messages I was trying to manage 3 concerns:
So I end up with a solution that I've tested on my fork that I feel elegant enough:
To provide explicit visibility for developers on what's currently deployed in production, I'm thinking a way to add environement variable in the docker image and display such value somewhere accessible in odoo. For deployment, as you suggest, changing version of the docker image in a docker compose file (or .env) and up the project will do the job. The last missing things here (from my point of view) is the unreleased dependency where I give some helps: OCA/vertical-association#151 which is technically ready to merge but probably needs some attention to make sure what is on the production server ! |
2f48dae to
13a6b0e
Compare
|
@petrus-v regarding unreleased dependencies, it's probably reasonable to remove this CI check from this repo. Regarding the release process, why not creating the tags manually? PAT are a kind of security risk and a bit of pain to manage since they expire, so if we can avoid them I tend to prefer. |
a5c3332 to
4608d96
Compare
I've removed the manual step that would have require PAT (Personal Access Token), bump my version configuration and update the release documentation by this commit 79512d3 |
07c3680 to
15e715b
Compare
Any comment welcome :) ps: If I can help with admin sys tasks I could help if needs. |
There might be something in the bot to prevent the publishing of some addons, or the whole repo. I'll need to check. I'll find a moment to deploy this on test.odoo-community.org. |
Add contribute tools in order to develop and release docker images for https://odoo-community.org using Acsonne toolsets likes hatch-odoo, odoo-bedrock... This helps to quickly create a locale environement close to what is installed on our production instance. Use following unreleased code: * odoo14-addon-membership-delegated-partner-line from OCA/vertical-association/pull/151 * odoo from OCA/OCB/pull/1299 Co-authored-by: Stéphane Bidoul <stephane.bidoul@acsone.eu> Co-authored-by: Holger Brunn <mail@hunki-enterprises.com>
15e715b to
0a184cd
Compare
|
I"ve squashed some commits to get a cleaner history ! |
Since some python wheels depend on the distro on which they have been build (eg psycopg2), we use an explicit cache id which includes the distro name.
It's necessary to run, e.g. github_connector migrations
|
@petrus-v I sent petrus-v#1 with a few minor tweaks, and deployed on https://test.odoo-community.org. The docker compose currently builds from a local clone of this branch. All looks good. Thanks for this work! |
Tweak build
* account_statement_import_online_wise were missing on staging only module missing from production 20250617 * l10n_ch_pain_base * l10n_ch_pain_credit_transfer * project_task_add_very_high * web_search_with_and and bumps all module versions
1a1587f to
0168aff
Compare
waiting for camptocamp/pytest-odoo#85
|
@petrus-v shall we merge this? |
|
@sbidoul I think the latest point without responses here is regarding build and publish process with some unreleased dependencies that may crash the publish CI pipeline that you know more than me. Otherwise this seems working on test environment so I'm in favour to merge it ! |
Here is ongoing work to build OCA' Odoo docker image.
As discussed w/ @sbidoul and the OCA Internal Working Group, here we give a try to include OCA instance project settings to build the images that may be deployed in test/production environment.
We can move that in an independent repository if we needs different maintainers or if it makes confusions ! We through starting here avoid extra repositories and would works as long oca-custom contains (I suppose) module that are only used by OCA ! Anyway I think existing CI/CD shouldn't be that much impacted by this exploration
Tasks
uvandhatch-odooOptionnal/To discuss
In the Dockerfile, add an entry point that neutralizes the database if we are in a non-prod environment.Get exacted module version in odoo database and freeze like in production (I'd like to give a try using latest module version but maybe I'm too reckless !) advices welcomes=> let's try with fresh modules