使用 uwsgi 安裝本地 readthedocs

使用 uwsgi 安裝本地 readthedocs

我正在嘗試設定 readthedocs 的本機實例來管理專案文件。我相信我已經使用 readthedocs 正確安裝了所有內容,並且它有自己的依賴項虛擬環境, 下列的:http://read-the-docs.readthedocs.org/en/latest/install.html

manage.py runserver沒有問題,所以現在我嘗試將其設定為與 nginx+uwsgi 一起運行。

使用“/var/www/rtd/checkouts/readthedocs.org”目錄中的命令列:

uwsgi --http :8111 --module readthedocs.wsgi --env DJANGO_SETTINGS_MODULE=readthedocs.settings -H /var/www/rtd

我收到錯誤:

django.core.exceptions.ImproperlyConfigured:導入模組privacy.backends.syncers.DoubleRemotePuller時出錯:“沒有名為privacy.backends.syncers的模組”

我懷疑這是某種路徑問題,並且無法找到該庫,因為它與runserver.

有人知道我在這裡缺少什麼嗎?或者,還有其他建議的方法可以執行 readthedocs 的本機實例嗎?

參考資料: http://uwsgi-docs.readthedocs.org/en/latest/tutorials/Django_and_nginx.html

答案1

我發現在使用時runserver,“閱讀thedocs.settings.sqlite" 被設定為 DJANGO_SETTINGS_MODULE。更新該uwsgi行以符合此解決了privacy.backends.syncers.DoubleRemotePuller導入問題

uwsgi --http :8111 --module readthedocs.wsgi --env DJANGO_SETTINGS_MODULE=readthedocs.settings -H /var/www/rtd

然而,當使用 postgres 運行時,這似乎仍然是一個問題。

相關內容