I'm trying to deploy a basic Laravel application to Cloud Foundry. Below you can see the output after I ranibmcloud cf push
:
Invoking 'cf push'...
Pushing from manifest to org ***** / space dev as *****...
Using manifest file *****\manifest.yml
Getting app info...
Updating app with these attributes...
name: *****
path: *****
buildpacks:
https://github.com/cloudfoundry/php-buildpack.git#v4.4.13
disk quota: 1G
health check type: port
instances: 1
memory: 256M
stack: cflinuxfs3
services:
Db2-8n
availability-monitoring-auto
env:
APP_DEBUG
APP_ENV
APP_NAME
CF_STAGING_TIMEOUT
CF_STARTUP_TIMEOUT
routes:
*****.mybluemix.net
Updating app *****...
Mapping routes...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
26.79 MiB / 26.79 MiB [===========] 100.00% 11s
Waiting for API to complete processing files...
Staging app and tracing logs...
Cell 79671882-f747-4d8b-8466-68fb1c4bfc6a creating container for instance c10e2d4c-d35f-4920-8002-ce81e32dcc3c
Cell 79671882-f747-4d8b-8466-68fb1c4bfc6a successfully created container for instance c10e2d4c-d35f-4920-8002-ce81e32dcc3c
Downloading app package...
Downloading build artifacts cache...
Downloaded build artifacts cache (221B)
Downloaded app package (43.9M)
-------> Buildpack version 4.4.13
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.5
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7_7.4.5_linux_x64_cflinuxfs3_c0055c53.tgz] to [/tmp]
The extension 'mcrypt' is not provided by this buildpack.
Downloaded [https://buildpacks.cloudfoundry.org/dependencies/php/php7_7.4.5_linux_x64_cflinuxfs3_c0055c53.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 2386 0 --:--:-- --:--:-- --:--:-- 2386
Loading composer repositories with package information
Installing dependencies from lock file
Package operations: 0 installs, 0 updates, 37 removals
- Removing webmozart/assert (1.9.1)
- Removing theseer/tokenizer (1.2.0)
- Removing sebastian/version (2.0.1)
- Removing sebastian/type (1.1.3)
- 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 (3.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 scrivo/highlight.php (v9.18.1.1)
- Removing phpunit/phpunit (8.5.8)
- 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 (7.0.10)
- Removing phpspec/prophecy (1.11.1)
- Removing phpdocumentor/type-resolver (1.3.0)
- Removing phpdocumentor/reflection-docblock (5.2.0)
- Removing phpdocumentor/reflection-common (2.2.0)
- Removing phar-io/version (2.0.1)
- Removing phar-io/manifest (1.0.3)
- Removing nunomaduro/collision (v4.2.0)
- Removing myclabs/deep-copy (1.10.1)
- Removing mockery/mockery (1.4.1)
- Removing hamcrest/hamcrest-php (v2.0.1)
- Removing fzaninotto/faker (v1.9.1)
- Removing filp/whoops (2.7.3)
- Removing facade/ignition-contracts (1.0.1)
- Removing facade/ignition (2.3.4)
- Removing facade/flare-client-php (1.3.4)
- Removing doctrine/instantiator (1.3.1)
Package moontoast/math is abandoned, you should avoid using it. Use brick/math 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/a299fb3027da6b25566e06badf712812/scripts/compile.py", line 59, in <module>
.from_build_pack('lib/additional_commands')
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/build_pack_utils/builder.py", line 212, in extensions
process_extension(path, ctx, 'compile', process, args=[self])
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/build_pack_utils/utils.py", line 69, in process_extension
success(getattr(extn, to_call)(*args))
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 444, in compile
return composer.compile(install)
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/lib/extension_helpers.py", line 154, in compile
self._compile(install)
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 196, in _compile
self.run()
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 343, in run
*self._ctx['COMPOSER_INSTALL_OPTIONS'])
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/extensions/composer/extension.py", line 390, in run
shell=True)
File "/tmp/buildpackdownloads/a299fb3027da6b25566e06badf712812/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 0x7f994f249930>' returned non-zero exit status 1
Failed to compile droplet: Failed to run finalize script: exit status 1
Exit status 223
Cell 79671882-f747-4d8b-8466-68fb1c4bfc6a stopping instance c10e2d4c-d35f-4920-8002-ce81e32dcc3c
Cell 79671882-f747-4d8b-8466-68fb1c4bfc6a destroying container for instance c10e2d4c-d35f-4920-8002-ce81e32dcc3c
Error staging application: App staging failed in the buildpack compile phase
FAILED
The log ofibmcloud cf push
withBP_DEBUG
set totrue
is available here:
https://drive.google.com/file/d/1NL1KxqdJv4k0QtIrrySwb-XF_7VwFO7l/view?usp=sharing
Here is mycomposer.json
file:
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": [
"framework",
"laravel"
],
"license": "MIT",
"require": {
"php": "^7.2.5",
"fideloper/proxy": "^4.2",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^6.3",
"laravel/framework": "^7.22.2",
"laravel/telescope": "^3.5",
"laravel/tinker": "^2.0",
"laravel/ui": "^2.1"
},
"require-dev": {
"facade/ignition": "^2.0",
"fzaninotto/faker": "^1.9.1",
"mockery/mockery": "^1.3.1",
"nunomaduro/collision": "^4.1",
"phpunit/phpunit": "^8.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"autoload": {
"psr-4": {
"App\\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
]
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"minimum-stability": "dev",
"prefer-stable": true,
"scripts": {
"post-autoload-dump": [
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
"@php artisan package:discover --ansi"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
]
}
}
Here is myoptions.json
file:
{
"PHP_VERSION": "{PHP_70_LATEST}",
"COMPOSER_VENDOR_DIR": "vendor",
"WEBDIR": "public"
}
Here is mymanifest.yml
file:
---
applications:
- name: *****
memory: 256M
buildpacks: [ https://github.com/cloudfoundry/php-buildpack.git#v4.4.13 ]
random-route: true
env:
APP_DEBUG: false
CF_STAGING_TIMEOUT: 15
CF_STARTUP_TIMEOUT: 15
APP_NAME: *****
I've been searching for a solution to this issue for quite a while now, but I couldn't find anything that could help me. I hope someone here has better luck and can find a solution to this... Any help is greatly appreciated :)
The solution to this issue was renaming the.pb-config
folder to.bp-config
. The tutorial available under this link has a spelling error and that was the reason for all the suffering...
Our community is visited by hundreds of web development professionals every day. Ask your question and get a quick answer for free.
Find the answer in similar questions on our website.
Do you know the answer to this question? Write a quick response to it. With your help, we will make our community stronger.
PHP (from the English Hypertext Preprocessor - hypertext preprocessor) is a scripting programming language for developing web applications. Supported by most hosting providers, it is one of the most popular tools for creating dynamic websites.
The PHP scripting language has gained wide popularity due to its processing speed, simplicity, cross-platform, functionality and distribution of source codes under its own license.
https://www.php.net/
Laravel is a free open source PHP framework that came out in 2011. Since then, it has been able to become the framework of choice for web developers. One of the main reasons for this is that Laravel makes it easier, faster, and safer to develop complex web applications than any other framework.
https://laravel.com/
Foundation, similar to Bootstrap, has become very popular as a more complex framework with some advanced but easy-to-implement CSS components. It is built with Sass, so just like Bootstrap, it is customizable. In addition to this, it also boasts some features that help make the design mobile responsive.
https://get.foundation/
Welcome to the Q&A site for web developers. Here you can ask a question about the problem you are facing and get answers from other experts. We have created a user-friendly interface so that you can quickly and free of charge ask a question about a web programming problem. We also invite other experts to join our community and help other members who ask questions. In addition, you can use our search for questions with a solution.
Ask about the real problem you are facing. Describe in detail what you are doing and what you want to achieve.
Our goal is to create a strong community in which everyone will support each other. If you find a question and know the answer to it, help others with your knowledge.