I'm a dev working at Baserow and am currently reworking our Docker / CI for the next version of Baserow 1.9 which is not yet released. As part of this we will be providing a new Dockerhub
baserow/baserow image which runs Baserow and all of it's services in one container. We are also hoping to change our cloudron image we provide and support (https://gitlab.com/bramw/baserow/-/blob/develop/deploy/cloudron/Dockerfile) to instead build from and be a slight variation of this new
I do not believe that these changes if they happen will break the cloudron packaged Baserow at https://git.cloudron.io/cloudron/baserow-app, and it could simply bump its Baserow version to 1.9 to release successfully.
However this raises some questions about https://git.cloudron.io/cloudron/baserow-app which atm is a copy and slight edit of our own image. If we were to change our
cloudron image to be a variation of the
baserow/baserow image instead then our cloudron and the cloudron images would differ as follows:
- The base image we are building from is ultimately
- Our new
- Has new
supervisordsetup files and related bash scripts used as entrypoints etc.
- Now uses Caddy instead of nginx
- Removes the service
- Has new
- Our new
baserow/baserowimage sets up exactly the correct versions of node, psql, redis, python etcetc we support. In contrast currently the cloudron base image 3.0.0 uses node 14 and 3.2.0 node 16 which we don't yet support for Baserow.
baserow/baserowimage only installs dependencies required to run Baserow, compared with using
cloudron/basewhich installs a number of other dependencies not required for Baserow etc.
From what I can tell these are our options:
- We go ahead with the changes above to the Baserow provided cloudron image, no changes other than a version bump are made to the Cloudron Baserow image. As a result we end up with two quite different ways of packaging Baserow for Cloudron. Additionally the cloudron way still has the now unused mjml service and future changes to the Baserow services will make upgrading harder.
- We go ahead with the Baserow side of the changes, and we also change how Cloudron packages Baserow to be identical (the Docker image becomes)
ARG FROM_IMAGE=baserow/baserow:1.9 FROM $FROM_IMAGE as image_base ENV DATA_DIR=/app/data/ RUN apt-get remove -y postgresql postgresql-contrib # TODO copy over the deploy/cloudron/cloudron_env.sh to the cloudron baserow repo, remove all of the other setup files which now # just come baked into baserow/baserow:1.9 COPY deploy/cloudron/cloudron_env.sh /baserow/supervisor/env/cloudron_env.sh
- We go with some sort of hybrid multi-stage image in the cloudron repo, which copies relevant parts from
baserow/baserow:1.9but is still built based
FROM cloudron/base:3.0.0, which would look something like (i've cut out some setup sections):
ARG FROM_IMAGE=baserow/baserow:1.9 FROM $FROM_IMAGE as image_base FROM cloudron/base:3.0.0@sha256:455c70428723e3a823198c57472785437eb6eab082e79b3ff04ea584faf46e92 ENV DOCKER_USER=cloudron ENV DATA_DIR=/app/data # VARIOUS APT-GET / REDIS SETUP STEPS ETC # ======================== # = BASEROW # ======================== COPY --chown=cloudron:cloudron --from=image_base /baserow/ /baserow/ # The copy above will have chowned the supervisor folder to cloudron user when it should # be root. RUN chown -R root:root /baserow/supervisor # Virtualenvs are not portable and especially not so between image_base which is debian # and focal (cloudron/base). We install our python venv here instead. RUN rm /baserow/venv -rf && \ python3 -m pip install --no-cache-dir --no-warn-script-location --disable-pip-version-check --upgrade pip==22.0.3 && \ python3 -m pip install --no-cache-dir --no-warn-script-location --upgrade virtualenv==20.13.1 && \ python3 -m virtualenv /baserow/venv # hadolint ignore=SC1091 RUN . /baserow/venv/bin/activate && pip3 install --no-cache-dir -r /baserow/backend/requirements/base.txt RUN cd /baserow/web-frontend && yarn install && yarn build && chown cloudron: -R /baserow/web-frontend/ COPY deploy/cloudron/cloudron_env.sh /baserow/supervisor/env/cloudron_env.sh COPY deploy/all-in-one/baserow.sh /baserow.sh ENTRYPOINT ["/baserow.sh"] CMD ["start"]
- We (Baserow) delete our own separate cloudron image and we entirely switch to using https://git.cloudron.io/cloudron/baserow-app . Additionally we could then pick one of the 3 options above and apply them to the cloudron baserow repo.
From Baserow's perspective of keeping our various Dockerfiles simple and easy to maintain option 2 would be our preferred one. My understanding is that as long as the Docker image running on cloudron follows a few conventions (put data in /app/data being the main one) then it should work correctly.
I'd love to get ideas and feedback from you guys on this. I'm also happy to help contributing any of the above changes to the cloudron baserow repo.