Is it possible to change invenio.cfg values, for example allowed hosts, without rebuilding?
you don’t have to rebuild the whole project:
- stop the running web server and celery
- change the
invenio.cfg, see here for more info
- restart the server
I hope it helps!
I’m using docker image
invenio-cli containers start --lock --build --setup
How do I stop celery? Is that a docker container as well?
docker exec -it <container_id> /bin/bash to change invenio.cfg inside the docker container, but that doesn’t work
In development, to stop see here.
When deploying with Docker, you will build the Docker image and Invenio will use your
When you run the container, then you should inject environment variables to override the default configuration, see here.
invenio-cli containers stop
invenio-cli containers start
Didn’t work. Do you know the path to config.py inside docker containers? I can modify the confiuration from there
Env vars are working correctly in my local env, and we don’t have other users reporting this issue.
You can have a look here how the current env is copied into the new env created by
❯ export INVENIO_APP_ALLOWED_HOSTS=['example.com'] ❯ echo $INVENIO_APP_ALLOWED_HOSTS [example.com] ❯ invenio-cli shell Launching subshell in virtual environment... ... ❯ echo $INVENIO_APP_ALLOWED_HOSTS [example.com] ❯ invenio shell --no-term-title -c "app.config['APP_ALLOWED_HOSTS']" Out: '[example.com]' ❯ pipenv run invenio shell --no-term-title -c "app.config['APP_ALLOWED_HOSTS']" Out: '[example.com]' > exit ❯ unset INVENIO_APP_ALLOWED_HOSTS ❯ pipenv run invenio shell --no-term-title -c "app.config['APP_ALLOWED_HOSTS']" Out: ['0.0.0.0', 'localhost', '127.0.0.1']
Just a warning:
invenio-cli is not meant to be run in any deployed env, only for development.
To answer your other question about the path to the
You can join our chatroom where other users facing similar issues might be able to help.