0

如果我将我的 PHP 应用程序从 Cloud9 推送到 Heroku,我的应用程序将部署在 Heroku 上。问题是将来,如果我必须执行一些错误修复或更新等,我是否能够编辑在 Heroku 上托管/部署的应用程序?


编辑:

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
4

1 回答 1

1

简单的答案是肯定的。您将能够推送您对应用程序所做的所有更改。为此,您可以简单地运行以下命令,您将能够在推送到存储库后看到您所做的所有更改。

   $ git init 

   $ heroku create 

   $ echo '{}' > composer.json

   $ heroku buildpacks:set heroku/php

(第一次部署应用程序时,您需要运行上述命令。此命令将为您在 heroku 上创建存储库,并将在 heroku 上设置 php buildpack。)

   $ git add . 

   $ git commit -am "some comment"

   $ git push heroku master

   $ heroku open

开始点击这里

于 2016-06-17T08:00:42.270 回答