-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vapor support #121
Comments
Hi! I think I need some help clarifying that. Vessel InitHere's what I don't see where/how that might require NPM/Node installed in the DeployThere's no deploy command at all, so I'm not sure what you're saying there. Let me know what you're seeing and I'm happy to help! |
Oh vessel init works just fine, I'm talking about the new vapor init and deploy commands. These rely on node and npm. This is the output from the vapor deploy command in the app container.
I'm not saying you should add this as default but using Vapor with Vessel won't work out of the box and I guess it'll be very much an important tool for many Laravel developers in the future. Btw I love Vessel. I'm trying to convince my team to use this instead of using completely different scripts for each project. |
Ah thank you, I didn’t read that correctly at all haha -
Ok, I’ll have to think on that. Maybe we just throw it all into one larger
container...
…On Sat, Sep 14, 2019 at 02:24 Sander Versluys ***@***.***> wrote:
Oh vessel init works just fine, I'm talking about the new vapor init and
deploy commands. These rely on node and npm.
This is the output from the vapor deploy command in the app container.
php vendor/bin/vapor deploy staging
Building project...
==> Copying Application Files
==> Harmonizing Configuration Files
==> Setting Build Environment
==> Executing Build Commands
==> Running Command: composer install --classmap-authoritative
Deprecation warning: Your package name mytrace-api is invalid, it should have a vendor name, a forward slash, and a package name. The vendor and package name can be words separated by -, . or _. The complete name should match "[a-z0-9]([_.-]?[a-z0-9]+)*/[a-z0-9]([_.-]?[a-z0-9]+)*". Make sure you fix this as Composer 2.0 will error.
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating optimized autoload files
ocramius/package-versions: Generating version class...
ocramius/package-versions: ...done generating version class
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Discovered Package: beyondcode/laravel-dump-server
Discovered Package: davidpiesse/nova-map
Discovered Package: drfraker/snipe-migrations
Discovered Package: ebess/advanced-nova-media-library
Discovered Package: facade/ignition
Discovered Package: fideloper/proxy
Discovered Package: grimzy/laravel-mysql-spatial
Discovered Package: intervention/image
Discovered Package: laravel/horizon
Discovered Package: laravel/nova
Discovered Package: laravel/passport
Discovered Package: laravel/telescope
Discovered Package: laravel/tinker
Discovered Package: laravel/vapor-core
Discovered Package: mad-web/nova-horizon-link
Discovered Package: mad-web/nova-telescope-link
Discovered Package: nesbot/carbon
Discovered Package: nunomaduro/collision
Discovered Package: nunomaduro/phpinsights
Discovered Package: santigarcor/laratrust
Discovered Package: spatie/laravel-medialibrary
Discovered Package: spatie/laravel-translatable
Package manifest generated successfully.
==> Running Command: php artisan event:cache
Cached events cleared!
Events cached successfully!
==> Running Command: npm install && npm run dev && rm -rf node_modules
sh: 1: npm: not found
In Process.php line 254:
The command "npm install && npm run dev && rm -rf node_modules" failed.
Exit Code: 127(Command not found)
Working directory: /var/www/.vapor/build/app
Output:
================
Error Output:
================
sh: 1: npm: not found
deploy [--commit [COMMIT]] [--message [MESSAGE]] [--without-waiting] [--] [<environment>]
I'm not saying you should add this as default but using Vapor with Vessel
won't work out of the box and I guess it'll be very much an important tool
for many Laravel developers in the future.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#121?email_source=notifications&email_token=AADSDUYAVV3EXYSOVOYGXS3QJSGTTA5CNFSM4IWRZOA2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD6WWLHA#issuecomment-531457436>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AADSDU64GKDOU3MHB7BG3R3QJSGTTANCNFSM4IWRZOAQ>
.
|
In the meantime, how could we make this work? Or would it only be possible with php/vapor installer etc installed on local machine directly? |
It's likely possible to run it locally if you have node/npm installed locally as well, yep! Note that you may need to do something like: TELESCOPE_ENABLED=false php vendor/bin/vapor deploy staging ...if your PHP env attempts to connect to Redis for telescope or other things while running that command. |
I just ran into the same issue, but with Laravel Nova... it always errors out with:
|
@madsem You will need to add node/npm to your app container. You can do this after container is running vessel exec app
Then, when inside container, you will run the following # curl -sL https://deb.nodesource.com/setup_12.x | bash
# apt-get install -y nodejs
When node is installed, it will also install npm |
Very nice! Thanks @mikeerickson appreciated :) |
Hi!
Note that running that command like that won’t save node into the app
container image. That change will only be around until you turn the
containers off (vis the down or stop commands).
…On Wed, Jun 24, 2020 at 10:56 madsem ***@***.***> wrote:
Very nice! Thanks @mikeerickson <https://github.com/mikeerickson>
appreciated :)
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#121 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADSDU2C3UZLXR7XQMQT6HTRYIO3TANCNFSM4IWRZOAQ>
.
|
Thanks @fideloper, that's not a big deal! Maybe it would be a good idea to indeed combine the app and node containers in a future relase though? |
Very true, so how about considering making it permanent and add to app Dockerfile (as I have done) because modern Laravel tooling has more requirements for presence of node/npm as opposed to using a separate container. I realize the bigger picture is container all the things, but Laravel does not play nice internally with this approach. It is still is good to have a node container around, but inside the context of Laravel tooling, adding node to app container has merit Ok, all done :) |
Orrr intercept npm calls inside the app container and redirect them to the node container? Just spitballing here, might be possible. |
@madsem or just use local install of node/npm and call it a day. I do nose work all day everyday in my normal workflow so locally installed node is an absolute must. |
@mikeerickson that is of course possible, and I also have npm installed. But not Redis... Overall I think easiest solution long-term would indeed be combining the containers. For me, I just added it to the projects Dockerfile for now. |
@madsem i didn’t mean doing everything locally, I was just referring to the actions that needed npm/node. I completely understand the desires to use containers for development work, I do the same here. However, since I don’t use vapor, I am not sure of your exact issue 🤓 |
Description
It's currently not possible to init a Vapor project with the default Vessel docker setup.
The vapor init and deploy script needs node and npm inside the docker container.
Laravel 6 also needs by default php-redis but this is already fixed in the vessel patch-2.
OS
MacOS Mojave
Docker
The output of
docker version
:The output of
docker-compose version
:The text was updated successfully, but these errors were encountered: