Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove database URL defaults #4802

Open
jnm opened this issue Jan 10, 2024 · 0 comments
Open

Remove database URL defaults #4802

jnm opened this issue Jan 10, 2024 · 0 comments
Labels

Comments

@jnm
Copy link
Member

jnm commented Jan 10, 2024

  1. Is it really useful to have defaults for database URLs? It's hard to imagine these existing for any reason other than to be overwritten, especially when we bizarrely have both localhost and redis_cache in the Redis defaults:
    kpi$ grep 'redis://' kobo/settings/base.py
    CELERY_BROKER_URL = os.environ.get('KPI_BROKER_URL', 'redis://localhost:6379/1')
    'REDIS_SESSION_URL', default='redis://redis_cache:6380/2'
    'default': env.cache(default='redis://redis_cache:6380/3'),
    
    1. The non-localhost hostnames look like they were set to match kobo-docker service names. If kobo-docker really depends on the default values, which I doubt, then let kobo-docker handle setting the environment variables appropriately.
    2. Removing the defaults would make it efficient to tell when the databases are not accessible, but that wouldn't differentiate between configuration errors and "non-runtime" mode.

Originally posted by @jnm in #3820 (comment)

@jnm jnm added the question label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant