Skip to content
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

11.0 fix filestore perms #15

Open
wants to merge 7 commits into
base: 11.0
Choose a base branch
from
Open

Conversation

PeterAlabaster
Copy link

@PeterAlabaster PeterAlabaster commented Oct 15, 2019

Fixes #14 for 11.0, not for 12.0 (that will need a seperate PR)

@Nick-OpusVL
Copy link
Contributor

This for the new car dealership project?

@PeterAlabaster
Copy link
Author

PeterAlabaster commented Oct 17, 2019

This for the new car dealership project?

Yes, however it's beneficial for any Odoo 11 which is based on docker-odoo-custom


print("/entrypoint.sh {}".format(arglist), file=sys.stderr)
# Only set the uid to Odoo if we are in fact running Odoo
# and not a custom command with docker-compose run ...
Copy link
Contributor

Choose a reason for hiding this comment

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

I think if running_odoo: already says this.

# and not a custom command with docker-compose run ...
print >>sys.stderr, "Changing uid to odoo uid: %s" %odoo_uid
os.setuid(odoo_uid)
print >>sys.stderr, "/entrypoint.sh {}".format(arglist)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd sooner stick with the function form of print().

Stick before all the other imports if you need to support python2:

from __future__ import print_function

Besides the statement form won't work in Python 3 anyway.

@Nick-OpusVL
Copy link
Contributor

Nick-OpusVL commented Oct 17, 2019

Oh @PeterAlabaster I also suggest adding to the README about the change, to say that users might have to explicitly use -u root or -u odoo in their docker command line as appropriate when running non-odoo commands whereas before they might not have had to.

@Nick-OpusVL
Copy link
Contributor

Nick-OpusVL commented Oct 17, 2019

Perhaps we should be versioning these so breaking changes like this have a version number bump at the third level (e.g. 11.0.2.7 -> 11.0.3.0) and non-breaking changes at the fourth (e.g. 11.0.3.0 -> 11.0.3.1), with the third-level having a branch (11.0.3) and fourth-level releases being a tag (11.0.3.0). This would allow us to pin projects using a particular 'compatibility version' into that series until we can get around to reviewing its usage and upgrading it.

We could freeze the two-level ones where they currently are and use three-level or four-level docker tags in our FROM clauses from this point on.

Copy link
Contributor

@Nick-OpusVL Nick-OpusVL left a comment

Choose a reason for hiding this comment

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

Dockerfile needs to finish with a Newline character for consistency with everything else.

Other than that, basically I tacitly approve this but I think this should go into our new repository when we do it so it doesn't silently break other projects.

Dockerfile Outdated
ONBUILD USER root
ONBUILD COPY ./addon-bundles/ /mnt/extra-addons-bundles/
ONBUILD RUN chmod -R u=rwX,go=rX /mnt/extra-addons-bundles
ONBUILD COPY ./requirements.txt /root/
ONBUILD RUN pip3 install -r /root/requirements.txt
ONBUILD USER odoo
ONBUILD RUN pip3 install -r /root/requirements.txt
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you add a trailing newline please?

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