[英]How can I check out a github repo from Heroku?
I would like to be able to log the number of words in certain files in a Github repo whenever there is a new push to the repo. 我希望能够在Github仓库中记录某些文件中的单词数量,只要有新的推送到仓库。 I have set up a hook on Github to hit a Django Heroku app url after each push, but I don't know how to run a git pull in python from a Django app running on Heroku.
我在每次推送后都在Github上设置了一个钩子来点击Django Heroku应用程序URL,但我不知道如何在Heroku上运行的Django应用程序中运行python中的git pull。 Is it possible to write to the local file system in Heroku?
是否可以写入Heroku中的本地文件系统?
Check out github repo from Heroku?
看看Heroku的github回购?
from the command line you can pull from heroku easily: git pull heroku master
从命令行你可以轻松地从heroku拉出来:
git pull heroku master
have set up a hook on Github to hit a Django Heroku app url after each push, but I don't know how to run a git pull in python from a Django app running on Heroku?
已经在Github上设置了一个钩子,在每次推送后点击一个Django Heroku应用程序URL,但我不知道如何在Heroku上运行的Django应用程序中运行python中的git pull?
Is it a different heroku App (from the one that was deployed) that will be doing the pull? 它是一个不同的heroku应用程序(来自已部署的应用程序)将进行拉动吗?
heroku run bash
or the like) to it, the pull app will eventually lose its logged in session (see why below) heroku run bash
等),拉应用程序最终将失去其登录会话(请参阅下面的原因) os
filesystem libraries to look into the application directory... os
文件系统库查看应用程序目录...... Is it even possible to write to the local file system in Heroku?
甚至可以写入Heroku中的本地文件系统?
Yes and No. You can write to the local filesystem, but its going to get nuked. 是和否。您可以写入本地文件系统,但它会被破解。 See: https://devcenter.heroku.com/articles/dynos#ephemeral-filesystem
请参阅: https : //devcenter.heroku.com/articles/dynos#ephemeral-filesystem
Also, with the EFS, each dyno is going to have a different EFS - so each web process is in a way sandboxed. 此外,使用EFS,每个dyno将具有不同的EFS - 因此每个Web进程都采用沙盒方式。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.