0

If I push my PHP app from Cloud9 to Heroku, my application will be deployed on Heroku. The question is that in the future, if I have to perform some bug fixing or update etc., will I be able to edit the application hosted/deployed on Heroku?


EDIT:

zeldish:~/workspace/appzeld (master) $ git push heroku master
Counting objects: 3, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 381 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)
remote: Compressing source files... done.
remote: Building source:
remote: 
remote: -----> Using set buildpack heroku/php
remote: -----> PHP app detected
remote: 
remote:  !     WARNING: No 'composer.json' found.
remote:        Using 'index.php' to declare app type as PHP is considered legacy
remote:        functionality and may lead to unexpected behavior.
remote: 
remote: -----> Bootstrapping...
remote: -----> Installing platform packages...
remote:        NOTICE: No runtime required in composer.lock; using PHP ^5.5.17
remote:        - apache (2.4.20)
remote:        - nginx (1.8.1)
remote:        - php (5.6.22)
remote: -----> Installing dependencies...
remote:        Composer version 1.1.2 2016-05-31 19:48:11
remote: -----> Preparing runtime environment...
remote:        NOTICE: No Procfile, using 'web: vendor/bin/heroku-php-apache2'.
remote: -----> Checking for additional extensions to install...
remote: 
remote: -----> Discovering process types
remote:        Procfile declares types -> web
remote: 
remote: -----> Compressing...
remote:        Done: 13.9M
remote: -----> Launching...
remote:        Released v4
remote:        https://*******.herokuapp.com/ deployed to Heroku
remote: 
remote: Verifying deploy... done.
To https://git.heroku.com/********.git
   59f63a5..4375225  master -> master
Solace
  • 8,612
  • 22
  • 95
  • 183

1 Answers1

1

Simple answer is yes. You will be able to push every changes you make to your application. in order to do that you can simply run below command and you will be able to see all the changes you have made after you push to your repository.

   $ git init 

   $ heroku create 

   $ echo '{}' > composer.json

   $ heroku buildpacks:set heroku/php

(you will need to run above commands when you deploying your app first time. This command will create repository on heroku for you and it will set php buildpack on heroku.)

   $ git add . 

   $ git commit -am "some comment"

   $ git push heroku master

   $ heroku open

to getting started click here

Shyam Bhimani
  • 1,310
  • 1
  • 22
  • 37
  • You write those commands in the git terminal of Cloud9 right? – Solace Jun 17 '16 at 08:10
  • 1
    yes that is correct. you may need to use $ heroku create when you are trying to deploy your app very first time. @Solace – Shyam Bhimani Jun 17 '16 at 08:38
  • 1
    I have updated my answer. sometimes you may need to set buildpacks, as heroku needs to know that you deploying php app. Thus, I added command to do that. @Solace – Shyam Bhimani Jun 17 '16 at 09:14
  • What if we do not set the composer.json. I did not, and got a notice about it, but I ignored it. The app seems to be working fine so far though :s – Solace Jun 17 '16 at 10:44
  • Please see the edit in my question. I posted the logs from Git terminal in Cloud9. See `WARNING: No 'composer.json' found.` I don't understand it.The app is working but the statement below it has scared me a bit. – Solace Jun 17 '16 at 10:50
  • 1
    As long as your app is working fine you can ignore it. In future if you get any trouble with app add that file to your project. It is hard to describe all here. follow this: https://elements.heroku.com/buildpacks/heroku/heroku-buildpack-php – Shyam Bhimani Jun 17 '16 at 18:09