Open czosel opened 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:
docker-compose.yml
file and present it as an example starting point. One (better?) option would be to provide an explicit development example, as well as a possible production example insteadENV=development
to the override file. This triggers the additional dependencies. We could solve this by also suggesting the build:
bit to be added there as well, which is exactly what "our" override file does.ENV=demo
mode, that disables the security stuff, but doesn't require the dev dependencies.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.
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
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:The simplest workaround I came up with is to add a local Dockerfile containing only one line:
and adding a build instruction to the compose file:
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?