-
Notifications
You must be signed in to change notification settings - Fork 50
Conversation
Codecov Report
@@ Coverage Diff @@
## master #220 +/- ##
==========================================
+ Coverage 32.92% 33.17% +0.24%
==========================================
Files 50 52 +2
Lines 3836 3901 +65
==========================================
+ Hits 1263 1294 +31
- Misses 2573 2607 +34
Continue to review full report at Codecov.
|
ttf-dejavu ttf-droid ttf-freefont ttf-liberation ttf-ubuntu-font-family | ||
|
||
RUN wget https://github.com/madnight/docker-alpine-wkhtmltopdf/raw/master/wkhtmltopdf -O /usr/bin/wkhtmltopdf | ||
RUN chmod +x /usr/bin/wkhtmltopdf |
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.
Take a look at this - https://github.com/LasLabs/docker-odoo/blob/master/Dockerfile#L45
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.
@lasley For the record, your Dockerfile use a wkhtmlbinary build without qt support, hence no header/footer and other random trouble. That's why I tried to find a binary on Internet compiled with both qt and alpine, this works on my instance.
Hope wkhtmltopdf provide soon a package for alpine with qt, this is quite bothersome.
@tedsalmon please review |
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.
code, no test
|
||
super(ClouderVolume, self).hook_deploy() | ||
|
||
if not self.node_id.runner_id or \ |
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.
Bit easier to read using any, IMO
if any((
not self.node_id.runner_id,
self.node_id.runner_id.application_id.type_id.name == 'docker',
)):
|
||
super(ClouderVolume, self).hook_purge() | ||
|
||
if not self.node_id.runner_id or \ |
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.
Same comment re any
@@ -0,0 +1,55 @@ | |||
<?xml version="1.0" encoding="utf-8"?> | |||
<odoo> | |||
<data> |
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.
No need for data tag using new odoo tag, unless you need both update and noupdate data in the same file
RUN echo "[program:php]" >> /etc/supervisord.conf | ||
RUN echo "command=php-fpm7" >> /etc/supervisord.conf | ||
|
||
CMD supervisord -c /etc/supervisord.conf |
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.
newline at EOF
RUN echo "[program:nginx]" >> /etc/supervisord.conf | ||
RUN echo "command=nginx" >> /etc/supervisord.conf | ||
RUN echo "[program:php]" >> /etc/supervisord.conf | ||
RUN echo "command=php-fpm7" >> /etc/supervisord.conf |
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.
IMO these would be more clear in a file, then use cat $FILE > /etc/supervisord.conf
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.
I agree but I'm not sure I can properly test it right now. If you don't mind, I'd rather merge it like that and correct all the Dockerfile later.
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.
I'm good with it 👍
clouder/models/service.py
Outdated
self.deploy_links() | ||
self.deploy_links() | ||
|
||
for child in self.child_ids: |
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.
.filtered(
clouder/models/service.py
Outdated
self = self.with_context(backup_comment='First backup') | ||
self.backup_exec(no_enqueue=True) | ||
|
||
for child in self.child_ids: |
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.
self.child_ids.mapped('child_id').recursive_backup()
clouder/models/service.py
Outdated
@@ -1362,13 +1399,10 @@ def deploy(self): | |||
# Create childs | |||
if self.child_ids: | |||
for child in self.child_ids: |
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.
Use filtered
clouder/models/service.py
Outdated
@@ -1415,6 +1452,11 @@ def hook_purge_one(self): | |||
return | |||
|
|||
@api.multi | |||
def purge_with_volume(self): | |||
self = self.with_context(no_enqueue=True, purge_volume=True) |
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.
Reassigning self is pretty hacky IMO. Why not just assign to another variable and use that?
clouder/models/service.py
Outdated
self.stop() | ||
# self.purge_salt() | ||
self.hook_purge_one() | ||
|
||
if 'purge_volume' in self.env.context: | ||
for volume in self.volume_ids: |
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.
self.volume_ids.mapped('volume_id').unlink()
Thanks @lasley ! Ready for review |
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.
Thanks @YannickB
Hello all,
This is the PR for #219. As announced, this is a heavy refactor of the container structure, to remove the data/files/exec we used until now.
-Add new clouder.volume model. The clouder.volume is linked to service but not removed when service is unlink (unless explicit)
-Bind/Postfix/Proxy/Postgres/Odoo templates are simplified and don't use data/files/exec anymore
-SSH template is now a new application type
-Resolve some bug with raise_error having wrong number of argument
-Service now know they have to create a container thanks to an explicit checkbox, remove dummy field.
Also I officially drop the support for Odoo 8. You can still deploy Odoo 8 instance with Clouder, but you can't install Clouder module on Odoo 8 anymore. The reason is mainly the use of odoo tag in xml file.
Some image use my yannickburon docker hub repo, until the PR is merged and I can create the new image on official repo.