如何将身份验证和终结点添加到Django Celery Flower Monitoring? [英] How do I add authentication and endpoint to Django Celery Flower Monitoring?
本文介绍了如何将身份验证和终结点添加到Django Celery Flower Monitoring?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我一直在本地使用花,看起来很容易设置和运行,但是我看不到我如何在生产环境中进行设置。
I've been using flower locally and it seems easy enough to setup and run, but I can't see how I would set it up in a production environment.
特别是,如何添加身份验证,以及如何定义一个url来访问它?
In particular, how can I add authentication and how would I define a url to access it?
推荐答案
对于自定义地址,使用 - 地址
标志。
对于auth,请使用 - basic_auth
标志。
For custom address, use the --address
flag.
For auth, use the --basic_auth
flag.
请参见下文:
# celery flower --help
Usage: /usr/local/bin/celery [OPTIONS]
Options:
--address run on the given address
--auth regexp of emails to grant access
--basic_auth colon separated user-password to enable
basic auth
--broker_api inspect broker e.g.
http://guest:guest@localhost:15672/api/
--certfile path to SSL certificate file
--db flower database file (default flower.db)
--debug run in debug mode (default False)
--help show this help information
--inspect inspect workers (default True)
--inspect_timeout inspect timeout (in milliseconds) (default
1000)
--keyfile path to SSL key file
--max_tasks maximum number of tasks to keep in memory
(default 10000) (default 10000)
--persistent enable persistent mode (default False)
--port run on the given port (default 5555)
--url_prefix base url prefix
--xheaders enable support for the 'X-Real-Ip' and
'X-Scheme' headers. (default False)
这篇关于如何将身份验证和终结点添加到Django Celery Flower Monitoring?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文