简体   繁体   English

我如何查看Heroku的github仓库?

[英]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应用程序(来自已部署的应用程序)将进行拉动吗?

  • Yes? 是? then you are going to have issues. 那么你会遇到问题。 Because the pull app needs permission (heroku login) to pull... and it wont have it. 因为拉应用程序需要权限(heroku登录)来拉...而它不会拥有它。 Also, b/c of the ephemeral filesystem, even if you login (via heroku run bash or the like) to it, the pull app will eventually lose its logged in session (see why below) 此外,临时文件系统的b / c,即使您登录(通过heroku run bash等),拉应用程序最终将失去其登录会话(请参阅下面的原因)
  • No? 没有? then don't pull. 然后不要拉。 just use the 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.

相关问题 如何直接将文件从 colab 复制到 github 存储库? (可以将笔记本保存在 Github 存储库中) - How can I copy a file from colab to github repo directly? (It is possible to save the notebook in the Github repo) 如何从他们的 GitHub 存储库中获取 Helm 的二进制文件? - How can I get Helm's binary from their GitHub repo? 从Github存储库中检出jenkinsfile时,jenkinsfile可以从同一存储库中调用/启动python脚本吗? - When checking out a jenkinsfile from a Github repo, can the jenkinsfile call/start a python script from that same Repo? 如何使用ssh为bitbucket / github从私人仓库下载文件? - How can I download files from a private repo with ssh for bitbucket/github? 如何使用 GitHub API 提取私有仓库数据? - How can I pull private repo data using GitHub API? 如何在不克隆存储库的情况下使用 python 更新 github 存储库中的现有文件? - How can I update an existing file in a github repo with python without cloning the repo down? 如何从此 GitHub 存储库安装 RNNoise? - How to install RNNoise from this GitHub repo? 如何在 pyscript 中从 Github repo 安装模块? - How to install module from Github repo in pyscript? 在 Github repo 中检查容器的状态 - Check the status of the container in Github repo 在Github中,我可以从存储库之外的其他仓库运行python脚本吗? - In Github, can I run a python script from a different repo than where it's stored?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM