Commit Graph

8 Commits

Author SHA1 Message Date
Tim Abbott 2e533f32c2 thumbor: Fix handling of upgrades from 1.8.0 and older.
Apparently, our thumbor logic assumed S3_REGION would be present in
prod_settings.py.  While it is in newer Zulip releases, upgraded
servers won't have a copy of this field.
2019-01-02 13:33:41 -08:00
Tim Abbott bfb3dcec7e settings: Add a default value parameter to get_secret.
This lets us have a slightly cleaner interface for cases where we need
a custom default value than an `or None` in the definition (which
might cause issues with other falsey values).
2018-08-09 10:00:27 -07:00
Tim Abbott da56449c65 thumbor: Fix exceptions if LOCAL_UPLOADS_DIR is not set.
This is the typical configuration in /etc/zulip/settings.py for a site
using S3, since there's no obligation to set the setting to None
directly, and we're not importing the main `settings.py` (and thus not
getting DEFAULT_SETTINGS applied).
2018-07-31 13:56:41 -07:00
Tim Abbott d3baa43167 thumbor: Clean up whitespace in thumbor.conf. 2018-07-15 17:52:39 +05:30
Aditya Bansal 529e4e76c8 thumbnaling: Support S3 upload backend in thumbor.
Credits for doing this goes to @sampritipanda.
2018-07-15 00:57:59 +05:30
Tim Abbott 85d7ddbeca thumbor: Switch thumbor.conf to use a better system.
Previously, thumbor.conf read LOCAL_UPLOADS_DIR from
zproject/settings.py by calling get-django-setting, which ends up
importing Django (taking 250ms, and requiring a full Zulip virtualenv
to be installed on the system).

The new system (in production) just imports prod_settings.py, which
has a lot fewer dependencies and is also a lot faster.
2018-07-15 00:05:05 +05:30
Tim Abbott 50588274ff zthumbor: Use get_secret to configure thumbor.conf.
We need to use the value of SECURITY_KEY read from
/etc/zulip/zulip-secrets.conf (using get_secret), and also we disable
a few Thumbor features that we're not using. We also fix access to
secret keys by getting their values using get_secret.
2018-07-14 21:45:33 +05:30
Aditya Bansal 0fcf0c5052 thumbor: Add thumbor on port 9995 in development.
For now, this does nothing in a production environment, but it should
simplify the process of doing testing on the Thumbor implementation,
by integrating a lot of dependency management logic.
2018-01-29 13:10:29 -08:00