cloudfoundry / php-buildpack

A Cloud Foundry Buildpack for PHP.
Apache License 2.0
142 stars 347 forks source link

Error deploying empty Laravel portal in SCP #343

Closed nanomb closed 4 years ago

nanomb commented 4 years ago

What version of Cloud Foundry and CF CLI are you using? (i.e. What is the output of running cf curl /v2/info && cf version?

{
   "name": "",
   "build": "",
   "support": "",
   "version": 0,
   "description": "Cloud Foundry at SAP Cloud Platform",
   "authorization_endpoint": "https://login.cf.eu10.hana.ondemand.com",
   "token_endpoint": "https://uaa.cf.eu10.hana.ondemand.com",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "app_ssh_endpoint": "ssh.cf.eu10.hana.ondemand.com:2222",
   "app_ssh_host_key_fingerprint": "TD1dRQINLi2KxilVLzAI8tXB2h8MP79oyVJnUwshjdc",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.cf.eu10.hana.ondemand.com:443",
   "api_version": "2.146.0",
   "osbapi_version": "2.15",
   "bits_endpoint": "https://bits.cf.eu10.hana.ondemand.com",
   "user": "99b60e7b-0b73-4b2f-bf28-3ba75143c3c2"
}
cf version 6.50.0+4f0c3a2ce.2020-03-03

What version of the buildpack you are using?

buildpack: https://github.com/cloudfoundry/php-buildpack

If you were attempting to accomplish a task, what was it you were attempting to do?

Trying to deploy app in SCP

What did you expect to happen?

Deployment correct

What was the actual behavior?

Using manifest file C:\Users\fernamar\Documents\php\test\blog\manifest.yml
Deprecation warning: Use of 'buildpack' attribute in manifest is deprecated in favor of 'buildpacks'. Please see https://docs.cloudfoundry.org/devguide/deploy-apps/manifest-attributes.html#deprecated for alternatives and other app manifest deprecations. This feature will be removed in the future.

Getting app info...
Updating app with these attributes...
  name:                UFDLaravel
  path:                C:\Users\fernamar\Documents\php\test\blog
  buildpacks:
    https://github.com/cloudfoundry/php-buildpack
  disk quota:          1G
  health check type:   port
  instances:           1
  memory:              512M
  stack:               cflinuxfs3
  env:
    APP_DEBUG
    CF_STAGING_TIMEOUT
    CF_STARTUP_TIMEOUT
  routes:
    ufdlaravel.cfapps.eu10.hana.ondemand.com

Updating app UFDLaravel...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 7.50 MiB / 7.50 MiB [========================================================================] 100.00% 7s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Cell bef55cc5-47ce-4759-b0f2-2d1e9ec2eb57 creating container for instance 99bf727f-a3c5-4ed3-b956-ef239e4ac979
   Cell bef55cc5-47ce-4759-b0f2-2d1e9ec2eb57 successfully created container for instance 99bf727f-a3c5-4ed3-b956-ef239e4ac979
   Downloading app package...
   Downloaded app package (10.4M)
   -------> Buildpack version 4.4.12
   Installing HTTPD
   HTTPD 2.4.43
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/httpd/httpd_2.4.43_linux_x64_cflinuxfs3_59c67ff8.tgz] to [/tmp]
   Installing PHP
   PHP 7.4.4
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7-7.4.4-linux-x64-cflinuxfs3-787e1173.tgz] to [/tmp]
   The extension 'mcrypt' is not provided by this buildpack.
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7-7.4.4-linux-x64-cflinuxfs3-787e1173.tgz] to [/tmp]
   Downloaded [https://buildpacks.cloudfoundry.org/dependencies/composer/composer_1.10.5_linux_noarch_any-stack_a1f79ebd.phar] to [/tmp]
     % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                    Dload  Upload   Total   Spent    Left  Speed
     0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
   100   482  100   482    0     0  12358      0 --:--:-- --:--:-- --:--:-- 12358
   Loading composer repositories with package information
   Installing dependencies from lock file
   Package operations: 0 installs, 0 updates, 33 removals
     - Removing webmozart/assert (1.8.0)
     - Removing theseer/tokenizer (1.1.3)
     - Removing sebastian/version (2.0.1)
     - Removing sebastian/resource-operations (2.0.1)
     - Removing sebastian/recursion-context (3.0.0)
     - Removing sebastian/object-reflector (1.1.1)
     - Removing sebastian/object-enumerator (3.0.3)
     - Removing sebastian/global-state (2.0.0)
     - Removing sebastian/exporter (3.1.2)
     - Removing sebastian/environment (4.2.3)
     - Removing sebastian/diff (3.0.2)
     - Removing sebastian/comparator (3.0.2)
     - Removing sebastian/code-unit-reverse-lookup (1.0.1)
     - Removing phpunit/phpunit (7.5.20)
     - Removing phpunit/php-token-stream (3.1.1)
     - Removing phpunit/php-timer (2.1.2)
     - Removing phpunit/php-text-template (1.2.1)
     - Removing phpunit/php-file-iterator (2.0.2)
     - Removing phpunit/php-code-coverage (6.1.4)
     - Removing phpspec/prophecy (v1.10.3)
     - Removing phpdocumentor/type-resolver (1.1.0)
     - Removing phpdocumentor/reflection-docblock (5.1.0)
     - Removing phpdocumentor/reflection-common (2.0.0)
     - Removing phar-io/version (2.0.1)
     - Removing phar-io/manifest (1.0.3)
     - Removing nunomaduro/collision (v3.0.1)
     - Removing myclabs/deep-copy (1.9.5)
     - Removing mockery/mockery (1.3.1)
     - Removing hamcrest/hamcrest-php (v2.0.0)
     - Removing fzaninotto/faker (v1.9.1)
     - Removing filp/whoops (2.7.1)
     - Removing doctrine/instantiator (1.3.0)
     - Removing beyondcode/laravel-dump-server (1.3.0)
   Package jakub-onderka/php-console-color is abandoned, you should avoid using it. Use php-parallel-lint/php-console-color instead.
   Package jakub-onderka/php-console-highlighter is abandoned, you should avoid using it. Use php-parallel-lint/php-console-highlighter instead.
   Generating optimized autoload files

     [RuntimeException]
     Could not scan for classes inside "database/seeds" which does not appear to be a file nor a folder

   install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
   -----> Composer command failed
   Traceback (most recent call last):
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/scripts/compile.py", line 59, in <module>
       .from_build_pack('lib/additional_commands')
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/build_pack_utils/builder.py", line 212, in extensions
       process_extension(path, ctx, 'compile', process, args=[self])
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/build_pack_utils/utils.py", line 69, in process_extension
       success(getattr(extn, to_call)(*args))
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 444, in compile
       return composer.compile(install)
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/extension_helpers.py", line 154, in compile
       self._compile(install)
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 196, in _compile
       self.run()
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 343, in run
       *self._ctx['COMPOSER_INSTALL_OPTIONS'])
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/extensions/composer/extension.py", line 390, in run
       shell=True)
     File "/tmp/buildpackdownloads/3f0c03c7602ee67512337b56bc424f4b/lib/build_pack_utils/runner.py", line 109, in stream_output
       raise CalledProcessError(retcode, cmd)
   build_pack_utils.runner.CalledProcessError: Command '<open file '<fdopen>', mode 'w' at 0x7fe8712db930>' returned non-zero exit status 1
   Failed to compile droplet: Failed to run finalize script: exit status 1
   Exit status 223
   Cell bef55cc5-47ce-4759-b0f2-2d1e9ec2eb57 stopping instance 99bf727f-a3c5-4ed3-b956-ef239e4ac979
   Cell bef55cc5-47ce-4759-b0f2-2d1e9ec2eb57 destroying container for instance 99bf727f-a3c5-4ed3-b956-ef239e4ac979
Error staging application: App staging failed in the buildpack compile phase
FAILED

Please confirm where necessary:

cf-gitbot commented 4 years ago

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/172461687

The labels on this github issue will be updated when the story is started.

dmikusa commented 4 years ago

The buildpack is running composer install for you. That command is failing:

[RuntimeException] Could not scan for classes inside "database/seeds" which does not appear to be a file nor a folder

Look at your composer.json file to see what is being run and why it's failing. It appears to be missing some files "database/seeds".

Hope that helps!

vnc-digital commented 4 years ago

same issue.Why we cant able to laravel projects in cloud foundary.