projectcaluma / caluma

A collaborative form editing service
https://caluma.io/
GNU General Public License v3.0
68 stars 26 forks source link

RFC: Publish dev container? #1982

Open czosel opened 1 year ago

czosel commented 1 year ago

When following the Caluma getting started guide, the caluma container currently doesn't start because it is configured with ENV=development but is missing dev dependencies:

ModuleNotFoundError: No module named 'django_extensions'

The simplest workaround I came up with is to add a local Dockerfile containing only one line:

FROM ghcr.io/projectcaluma/caluma:latest

and adding a build instruction to the compose file:

    build:
      context: .

It would be nice to remove this friction from the first contact with Caluma - how about we publish a dev container, which contains all the dev dependencies?

winged commented 1 year ago

I think the published image is OK as a "production" image. When you're developing, you should build the image yourself, in my opinion. Having a separate "dev" image published makes things much more complicated.

There are a few potential issues with our current docs however:

All of the options have pros and cons. I think when you're enabling development mode, you should build the image locally. If you're just getting started, the build process can be a bit intimidating, as it will take a while depending on the user's machine.

The "demo" mode could be implemented rather easily, but adds a (small) bit of complexity to the already-complex settings file structure. Still simpler than publishing a dev image though.

winged commented 1 year ago

Just had a look at the code. In the caluma/settings/django.py we already have a check for ImportError. When I try to replay the getting started guide, things start up just fine - just the static files for the Graphiql interface are missing because we're still starting UWSGI and not the dev server.

Could it be that you have an old docker image in your local cache? The fix is kinda new-ish - from December 2022