我在 Heroku 上部署 Django 应用程序时遇到问题。 git Push 后家里什么都没有了。我不认为问题出在 git 上,因为我可以推送到 github 上的存储库。
(23:43:01 (venv)user@host ~/path $ git push heroku 4heroku
Everything up-to-date
(23:43:31 (venv)user@host ~/path $ heroku run bash
Running `bash` attached to terminal... up, run.3486
~ $ ls
~ $ ls -la
total 8
drwx------ 2 u12545 12545 4096 Mar 26 23:44 .
drwxr-xr-x 15 root root 4096 Oct 31 2011 ..
~ $ exit
(23:44:16 (venv)user@host ~/path $ heroku logs
......
2013-03-26T23:34:04+00:00 heroku[api]: Starting process with command `bash` by <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c2a7afa3abae82bba3aaadadeca1adecb7a9" rel="noreferrer noopener nofollow">[email protected]</a>
2013-03-26T23:34:05+00:00 heroku[run.8328]: Awaiting client
2013-03-26T23:34:05+00:00 heroku[run.8328]: Starting process with command `bash`
2013-03-26T23:34:06+00:00 heroku[run.8328]: State changed from starting to up
2013-03-26T23:34:39+00:00 heroku[run.8328]: Client connection closed. Sending SIGHUP to all processes
2013-03-26T23:34:40+00:00 heroku[run.8328]: State changed from up to complete
2013-03-26T23:34:40+00:00 heroku[run.8328]: Process exited with status 0
2013-03-26T23:44:00+00:00 heroku[api]: Starting process with command `bash` by <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="acc9c1cdc5c0ecd5cdc4c3c382cfc382d9c7" rel="noreferrer noopener nofollow">[email protected]</a>
2013-03-26T23:44:02+00:00 heroku[run.3486]: Starting process with command `bash`
2013-03-26T23:44:02+00:00 heroku[run.3486]: Awaiting client
2013-03-26T23:44:02+00:00 heroku[run.3486]: State changed from starting to up
2013-03-26T23:44:16+00:00 heroku[run.3486]: Process exited with status 0
最佳答案
如果您想要部署一个不是 master
分支的分支,您应该执行不同的推送。根据Heroku documentation :
Branches pushed to Heroku other than master will be ignored by this command. If you’re working out of another branch locally, you can either merge to master before pushing, or specify that you want to push your local branch to a remote master. To push a branch other than master, use this syntax:
$ git push heroku yourbranch:master
关于django - Heroku 上的家中没有文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15649666/