Contributors mailing list archives

Re: Recommended Contributor Tooling (RCT)

- 21/10/2015 09:14:52
I have few comments from our dockerizing experience in the production environment, that may contribute to this discussion:

1) We always use external database out of docker environment in production. More specifically we use Amazon RDS but even if it was managed by ourselves, we wouldn't use -link unless we use one database per docker. Db container restart/update messes up all containers that are linked to it and requires restart of all containers.  Yes this is a huge discussion since it has advantages and disadvantages, but i want you to know how we ended up.

2) We use a daily bugfix strategy, thus we get latest fixes from github every night and create a new image. The rest is just the restart of containers with the new image.

3) For downloading latest source/syncing fastest and safest option for us was to download zip archive. You might want to consider this since this saves space since you don't need git. It works like this:


&& unzip -q -d /tmp \
&& mv /tmp/odoo-${ODOO_VERSION} /opt/odoo/server \
&& rm -rf 

4) If you happen to launch a source in docker, python compiles .py files and starts creating .pyc files which increases docker instances' differential file system.  We get over this problem by compiling all sources during image creation.

python -m compileall /opt/odoo/server

5) We cleaned up the image to get smaller once the image is ready

apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false -o APT::AutoRemove::SuggestsImportant=false npm gcc \
        && apt-get -y autoclean \
        && rm -rf /var/lib/apt/lists/*

6) removed unnecessary addons which won't be used on the server side:
       rm -rf /opt/odoo/server/addons/hw_* \

I will be glad if we can use our experience to have something better for the community. Our docker is not published but i can share it here, if anyone is interested.