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

Commenting out lines in settings.py #394

Open
mp-strachan opened this issue Mar 23, 2023 · 1 comment
Open

Commenting out lines in settings.py #394

mp-strachan opened this issue Mar 23, 2023 · 1 comment

Comments

@mp-strachan
Copy link

Hello,

Is there anyway to remove a preference from the standard settings.py file?

I am looking at setting up S3 uploads, but the docs call for commenting out the LOCAL_UPLOADS_DIR key.

We use the SETTINGS_ feature of the docker-compose file to dynamically set all our settings, which is ideal as it allows us to use a .env file.

Is there anyway to remove the LOCAL_UPLOADS_DIR key for configuring S3, without manually providing a settings.py and zulip-secrets.conf file?

Cheers!
Matt

@ympek
Copy link

ympek commented Mar 5, 2024

Hello, we have encountered the same issue in our setup and resolved it.
Here is a trick to achieve this - the entrypoint script accepts ZULIP_CUSTOM_SETTINGS environment variable, which contents will be appended to the settings.py file. Any valid python will do, so just unset the variable here using del:

ZULIP_CUSTOM_SETTINGS: "del LOCAL_UPLOADS_DIR"

Hope it helps!

BR,
ympek

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants