$ heroku login heroku: Press any key to open up the browser to login or q to exit: Opening browser to https://cli-auth.heroku.com/auth/cli/browser/xxxxxxxxxxxxxxx Logging in... done Logged in as (herokuログインEmailアドレス) $
laradock $ docker-compose exec workspace php artisan key:generate --show base64:xxxxxxxxxxxxxxxxxxxxxxxxxxx laradock $ heroku config:set APP_KEY=xxxxxxxxxxx -a (herokuのアプリ登録名) › Warning: heroku update available from 7.35.0 to 7.41.1. Setting APP_KEY and restarting ⬢ (herokuのアプリ登録名)... done, v6 APP_KEY: base64:xxxxxxxxxxx laradock $ cd ../laravel laravel $ touch Procfile laravel $ vim Procfile laravel $ heroku git:remote -a (herokuのアプリ登録名) › Warning: heroku update available from 7.35.0 to 7.41.1. set git remote heroku to https://git.heroku.com/(herokuのアプリ登録名).git
しかしここで、Procfileをコミットするのを忘れていた。
laravel $ git push heroku master Counting objects: 10216, done. Delta compression using up to 4 threads. Compressing objects: 100% (7039/7039), done. Writing objects: 100% (10216/10216), 12.30 MiB | 2.30 MiB/s, done. Total 10216 (delta 3121), reused 9366 (delta 2627) remote: Compressing source files... done. remote: Building source: remote: remote: ! Warning: Multiple default buildpacks reported the ability to handle this app. The first buildpack in the list below will be used. remote: Detected buildpacks: PHP,Node.js remote: See https://devcenter.heroku.com/articles/buildpacks#buildpack-detect-order remote: -----> PHP app detected remote: -----> Bootstrapping... remote: -----> Installing platform packages... remote: - php (7.4.5) remote: - ext-mbstring (bundled with php) remote: - apache (2.4.43) remote: - nginx (1.18.0) remote: -----> Installing dependencies... remote: Composer version 1.10.5 2020-04-10 11:44:22 remote: remote: ! WARNING: Composer vendor dir found in project! remote: ! remote: ! Your Git repository contains Composer's 'vendor' directory. remote: ! remote: ! This directory should not be under version control; only your remote: ! 'composer.json' and 'composer.lock' files need to be added, as remote: ! Composer will handle installation of dependencies on deploy. remote: ! remote: ! To suppress this notice, first remove the folder from the index remote: ! by running 'git rm -r --cached vendor/'. remote: ! Next, edit your project's '.gitignore' file and add the folder remote: ! '/vendor/' to the list, then commit the changes. remote: ! remote: ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU remote: remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: Package operations: 0 installs, 0 updates, 39 removals remote: - Removing webmozart/assert (1.8.0) remote: - Removing theseer/tokenizer (1.1.3) remote: - Removing sebastian/version (2.0.1) remote: - Removing sebastian/type (1.1.3) remote: - Removing sebastian/resource-operations (2.0.1) remote: - Removing sebastian/recursion-context (3.0.0) remote: - Removing sebastian/object-reflector (1.1.1) remote: - Removing sebastian/object-enumerator (3.0.3) remote: - Removing sebastian/global-state (3.0.0) remote: - Removing sebastian/exporter (3.1.2) remote: - Removing sebastian/environment (4.2.3) remote: - Removing sebastian/diff (3.0.2) remote: - Removing sebastian/comparator (3.0.2) remote: - Removing sebastian/code-unit-reverse-lookup (1.0.1) remote: - Removing scrivo/highlight.php (v9.18.1.1) remote: - Removing phpunit/phpunit (8.5.4) remote: - Removing phpunit/php-token-stream (3.1.1) remote: - Removing phpunit/php-timer (2.1.2) remote: - Removing phpunit/php-text-template (1.2.1) remote: - Removing phpunit/php-file-iterator (2.0.2) remote: - Removing phpunit/php-code-coverage (7.0.10) remote: - Removing phpspec/prophecy (v1.10.3) remote: - Removing phpdocumentor/type-resolver (1.1.0) remote: - Removing phpdocumentor/reflection-docblock (5.1.0) remote: - Removing phpdocumentor/reflection-common (2.1.0) remote: - Removing phar-io/version (2.0.1) remote: - Removing phar-io/manifest (1.0.3) remote: - Removing nunomaduro/collision (v3.0.1) remote: - Removing myclabs/deep-copy (1.9.5) remote: - Removing mockery/mockery (1.4.0) remote: - Removing jakub-onderka/php-console-highlighter (v0.4) remote: - Removing jakub-onderka/php-console-color (v0.2) remote: - Removing hamcrest/hamcrest-php (v2.0.0) remote: - Removing fzaninotto/faker (v1.9.1) remote: - Removing filp/whoops (2.7.2) remote: - Removing facade/ignition-contracts (1.0.0) remote: - Removing facade/ignition (1.16.1) remote: - Removing facade/flare-client-php (1.3.2) remote: - Removing doctrine/instantiator (1.3.0) remote: Generating optimized autoload files remote: > Illuminate\Foundation\ComposerScripts::postAutoloadDump remote: > @php artisan package:discover --ansi remote: Discovered Package: fideloper/proxy remote: Discovered Package: laravel/tinker remote: Discovered Package: nesbot/carbon remote: Package manifest generated successfully. remote: -----> Preparing runtime environment... remote: NOTICE: No Procfile, using 'web: heroku-php-apache2'. remote: -----> Checking for additional extensions to install... remote: -----> Discovering process types remote: Procfile declares types -> web remote: remote: -----> Compressing... remote: Done: 19.6M remote: -----> Launching... remote: Released v7 remote: https://(登録アプリ名).herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/(登録アプリ名).git * [new branch] master -> master
vendorをバージョン管理に含めているのを怒られてる。
$ git commit -m "Procfileのコミット忘れ" [master b3f57a4] Procfileのコミット忘れ 1 file changed, 1 insertion(+) create mode 100644 Procfile $ git push heroku master Counting objects: 3, done. Delta compression using up to 4 threads. Compressing objects: 100% (2/2), done. Writing objects: 100% (3/3), 374 bytes | 374.00 KiB/s, done. Total 3 (delta 1), reused 0 (delta 0) remote: Compressing source files... done. remote: Building source: remote: remote: -----> PHP app detected remote: -----> Bootstrapping... remote: -----> Installing platform packages... remote: - php (7.4.5) remote: - ext-mbstring (bundled with php) remote: - apache (2.4.43) remote: - nginx (1.18.0) remote: -----> Installing dependencies... remote: Composer version 1.10.5 2020-04-10 11:44:22 remote: remote: ! WARNING: Composer vendor dir found in project! remote: ! remote: ! Your Git repository contains Composer's 'vendor' directory. remote: ! remote: ! This directory should not be under version control; only your remote: ! 'composer.json' and 'composer.lock' files need to be added, as remote: ! Composer will handle installation of dependencies on deploy. remote: ! remote: ! To suppress this notice, first remove the folder from the index remote: ! by running 'git rm -r --cached vendor/'. remote: ! Next, edit your project's '.gitignore' file and add the folder remote: ! '/vendor/' to the list, then commit the changes. remote: ! remote: ! For more info, refer to the Composer FAQ: http://bit.ly/1rlCSZU remote: remote: Loading composer repositories with package information remote: Installing dependencies from lock file remote: Package operations: 0 installs, 0 updates, 39 removals remote: - Removing webmozart/assert (1.8.0) remote: - Removing theseer/tokenizer (1.1.3) remote: - Removing sebastian/version (2.0.1) remote: - Removing sebastian/type (1.1.3) remote: - Removing sebastian/resource-operations (2.0.1) remote: - Removing sebastian/recursion-context (3.0.0) remote: - Removing sebastian/object-reflector (1.1.1) remote: - Removing sebastian/object-enumerator (3.0.3) remote: - Removing sebastian/global-state (3.0.0) remote: - Removing sebastian/exporter (3.1.2) remote: - Removing sebastian/environment (4.2.3) remote: - Removing sebastian/diff (3.0.2) remote: - Removing sebastian/comparator (3.0.2) remote: - Removing sebastian/code-unit-reverse-lookup (1.0.1) remote: - Removing scrivo/highlight.php (v9.18.1.1) remote: - Removing phpunit/phpunit (8.5.4) remote: - Removing phpunit/php-token-stream (3.1.1) remote: - Removing phpunit/php-timer (2.1.2) remote: - Removing phpunit/php-text-template (1.2.1) remote: - Removing phpunit/php-file-iterator (2.0.2) remote: - Removing phpunit/php-code-coverage (7.0.10) remote: - Removing phpspec/prophecy (v1.10.3) remote: - Removing phpdocumentor/type-resolver (1.1.0) remote: - Removing phpdocumentor/reflection-docblock (5.1.0) remote: - Removing phpdocumentor/reflection-common (2.1.0) remote: - Removing phar-io/version (2.0.1) remote: - Removing phar-io/manifest (1.0.3) remote: - Removing nunomaduro/collision (v3.0.1) remote: - Removing myclabs/deep-copy (1.9.5) remote: - Removing mockery/mockery (1.4.0) remote: - Removing jakub-onderka/php-console-highlighter (v0.4) remote: - Removing jakub-onderka/php-console-color (v0.2) remote: - Removing hamcrest/hamcrest-php (v2.0.0) remote: - Removing fzaninotto/faker (v1.9.1) remote: - Removing filp/whoops (2.7.2) remote: - Removing facade/ignition-contracts (1.0.0) remote: - Removing facade/ignition (1.16.1) remote: - Removing facade/flare-client-php (1.3.2) remote: - Removing doctrine/instantiator (1.3.0) remote: Generating optimized autoload files remote: > Illuminate\Foundation\ComposerScripts::postAutoloadDump remote: > @php artisan package:discover --ansi remote: Discovered Package: fideloper/proxy remote: Discovered Package: laravel/tinker remote: Discovered Package: nesbot/carbon remote: Package manifest generated successfully. remote: -----> Preparing runtime environment... remote: -----> Checking for additional extensions to install... remote: -----> Discovering process types remote: Procfile declares types -> web remote: remote: -----> Compressing... remote: Done: 19.5M remote: -----> Launching... remote: Released v8 remote: https://(登録アプリ名).herokuapp.com/ deployed to Heroku remote: remote: Verifying deploy... done. To https://git.heroku.com/(登録アプリ名).git 4c4b38e..b3f57a4 master -> master
これで、LINEのWebhookのURLを変えて終わり。