sinnbeck / laravel-served Goto Github PK
View Code? Open in Web Editor NEWDocker version of artisan serve (with alot more)
License: MIT License
Docker version of artisan serve (with alot more)
License: MIT License
"cache" served name to enable clean up of old containers and images on name change
I would like to make a change to allow the settings for DB etc to be pulled from .env rather than having to modify in config/served.php
can you add me as a user to this project so I can submit a pull request?
I consider switching to laravel zero and allow the user to publish a served executable to your project.
Will make it possible to simply run
php served up
php served list
//etc
Any thoughts?
I get the following:
Laravel has been
__ ___ __ ___ __
/__` |__ |__) \ / |__ | \
.__/ |___ | \ \/ |___ |__/
Visit the development server at:
http://localhost:8095
https://localhost:4443
this last url doesn't resolve.
@iammikek any good ideas for more services/images?
probably just me, but whats your normal process for interacting with the mysql DB?
I've tried to connect via the settings:
'mysql' => [
'service' => 'mysql',
'version' => '5.7',
'port' => 3306,
'root_password' => 'password',
'database' => 'laravel',
'username' => 'laravel',
'password' => 'password',
],
both with localhost + 127.0.0.1 via the Database Tab in phpstorm. No dice. Any advice?
A test database would be nice. Should it be created by default or be an option (the user can add one manually, but that is more work)
I am working on getting puppeteer support up and running.
I can get it working by installing chrome manually, setting ->noSandbox()
when using it. From what I can read, this is bad practice, and I would rather not force people to add ->noSandbox()
to code, that is going into production.
Hi,
Thanks for the awesome package. Im trying it in my new project and realise that the HTTP requests are really slow, ~2s each.
I guess its the docker file sync issue? Any way to improve that using this package?
P/S: Im using Mac.
Cheers,
Hiya sinnbeck,
Do you have any advice on how to set up phpstorm with Laravel-served?
I'm trying to set a remote PHP interpreter. When I select
Preferences > PHP > CLI Interpreter > Add New (Docker) I cant see the image from the list.
Have you had any success with this and be able to share how to do it?
If I run 'composer test' in root directory, I get the following error:
Class 'Tests\TestCase' not found in ~/laravel8/laravel-served/tests/Unit/DockerImageTest.php:13
This appears because the tests are being run outside of a Laravel install.
Switching to running tests within Laravel8 install
with the following
"sinnbeck/laravel-served": "@dev"
and
"repositories": [
{
"type": "path",
"url": "~/laravel8/laravel-served",
"options": {
"symlink": true
}
}
]
in composer.json
./vendor/bin/phpunit ../laravel-served/tests/Unit
I get the following:
and similar for other tests.
@sinnbeck can you let me know how you've got your package set up locally and what command you run to run your DockerImageTest class?
I just tried this package for the first time and I'm getting:
Starting php (Php 7.4-fpm) ...
ERROR : Unable to find image 'served/served_php:latest' locally
ERROR : docker: Error response from daemon: pull access denied for served/served_php, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.
The web and mysql seem to have started just fine.
Steps were as follows:
laravel new served --jet
cd served/
composer require sinnbeck/laravel-served --dev
php artisan served:up
installing into a new laravel8 install and running the following:
composer require sinnbeck/laravel-served --dev
Using version ^0.6.0 for sinnbeck/laravel-served
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 0 updates, 0 removals
- Installing sinnbeck/laravel-served (v0.6): Loading from cache
Writing lock file
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Illuminate\Contracts\Container\BindingResolutionException
Target class [Sinnbeck\LaravelServed\Commands\ServedRunCommand] does not exist.
at vendor/laravel/framework/src/Illuminate/Container/Container.php:811
807▕
808▕ try {
809▕ $reflector = new ReflectionClass($concrete);
810▕ } catch (ReflectionException $e) {
➜ 811▕ throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e);
812▕ }
813▕
814▕ // If the type is not instantiable, the developer is attempting to resolve
815▕ // an abstract type such as an Interface or Abstract Class and there is
Served has problems running behind a proxy. Post your issues here
Development Environment:
When running php artisan served:up
ERROR : : #1 [internal] load build definition from Dockerfile
#1 sha256:c4efc71d75273557a7c7be51362d361b9536dcdc8da29
#1 transferring dockerfile: 2.33kB done
#1 DONE 0.0s
#2 [internal] load .dockerignore
#2 sha256:41e4a846919871ed72ae59be3152c6ff843a8f948833
I am not sure where is the issue! please help
Add a flag to commands that allows showing what commands are run. Will need some regex replacements to ensure proper values are show (not "variables")
When you install Laravel served we are presented with the prompt to run the development server.
Visit the development server at: http://localhost:8095
How feasible would it be to allow the port to be changed, so that multiple instances can be run side by side?
would be good to have access to the port within config/served.php
I am trying to find some clever way to have the web service work with https. Both nginx and apache2
@sinnbeck I'm looking at ways we could introduce this feature and wonder how you'd like to approach it?
Are you imagining something like how heroku does eg "airy-craig" or "soaring-peaks"?
We would need to preserve the name once it was created. Would it be viable for us to write this name into the .env as SERVER_NAME?
I came across https://mattstauffer.com/blog/generating-synonymous-heroku-style-server-names-with-lumen/ which might give us a head start.
What do you think?
Currently you need to rebuild the php image to turn xdebug on and off. This thread is for working on a better way. Perhaps running multiple versions of php, or having an easy way to turn it on/off on the fly.
When running served it might be nice to check if the selected ports are all available on the host system
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.