0

My PHP app is stored in Cloud9 and I deployed it to Heroku from Cloud9 Git terminal.

Now there is a .json file in the app files, has a value stored, which comes from a value entered by the user in a TextField in the User Interface of the app.

The question is that whenever the user changes the value in the TextField, and saves the changes (in the source code, saving corresponds to writing the changes to the .json file), will someone have to commit (using $ git commit) and push (using $ git push heroku master) these changes from Cloud9 to Heroku? Or will that happened automatically?

Solace
  • 8,612
  • 22
  • 95
  • 183

1 Answers1

1

Your Heroku repo is simply a remote repo as far as cloud9 is concerned. Type:

git remote -v 

in cloud9 to see your remotes.

Files from your cloud9 repo only get deployed to Heroku when you do a git push.

Yoni Rabinovitch
  • 5,171
  • 1
  • 23
  • 34
  • Thank you for your answer. “So, yes, Heroku gets its own copy of the repo.” - yes, I thought so, because when the user changed the value in the textfield and saved the changes, the CHANGED value was visible in the contents of the .json file when accessed in the web browser (through the REST webservice URL), WHEREAS I could Not see the changed value in that .json file source in Cloud9. So far so good... – Solace Jun 20 '16 at 07:27
  • ... But THE PROBLEM IS that when I visit the same REST webservice URL (to view the contents of the .json file), I do NOT see the changed value any more, I rather see the initial value. The value seems to be set to the initial value after some time. – Solace Jun 20 '16 at 07:28
  • 1
    Hey, I suggest you decide whether you want to have this conversation on SO or on Quora. Anyway, I answered you already on Quroa (https://www.quora.com/When-we-deploy-a-PHP-app-from-Cloud9-to-Heroku-does-Heroku-get-its-own-copy-of-repository-or-does-it-access-the-repository-at-Cloud9-each-time). You need to understand how Heroku works. Specifically, you CANNOT use the file system of your dynos for storing anything persistently. – Yoni Rabinovitch Jun 20 '16 at 08:00
  • Well I saw the answer on Quora first and replied there, I saw this one after and commented here as well just so you can get upvotes here. That is a way of thanking you for answering my question. I have seen your reply on Quora. I am reading about it. – Solace Jun 20 '16 at 09:06
  • 1
    No problem, and don't hesitate to ask if you have more questions. – Yoni Rabinovitch Jun 20 '16 at 17:51