0

Gunicornを介して Heroku でtwoscoopsofdjango スケルトンを実行しようとしています。

プロジェクトのルートからのファイル ツリーを次に示します (読みやすくするために、いくつかの重要でないフォルダーを省略しています)。

.
├── LICENSE.txt
├── my_project
│   ├── manage.py
│   ├── my_project
│   │   ├── __init__.py
│   │   ├── settings
│   │   │   ├── base.py
│   │   │   ├── __init__.py
│   │   │   ├── local.py
│   │   │   ├── production.py
│   │   │   └── test.py
│   │   ├── urls.py
│   │   └── wsgi.py
│   └── templates
│       ├── 404.html
│       ├── 500.html
│       └── base.html
├── README.rst
├── requirements
│   ├── base.txt
│   ├── local.txt
│   ├── production.txt
│   └── test.txt
└── requirements.txt

ここで、Gunicorn をmy_project次の短縮ツリー内のフォルダーから実行したかのように実行する必要があります。

.
├── LICENSE.txt
├── my_project
│   ├── manage.py

ただし、Herokuはプロジェクト ルートの最下位レベルでしか取得されないため、プロジェクト ルートからコマンドを実行する必要があります。Procfile

したがって、シェル内でローカルにcd my_project実行するだけgunicorn my_project.wsgi --settings=my_project.settings.productionです。しかし、からこれを行う方法がわかりませんProcfile

そして、あなたの情報だけgunicorn --pythonpath=my_project my_project.wsgi --settings=my_project.settings.productionでも機能しません。

4

1 に答える 1