sinnbeck / laravel-served

Docker version of artisan serve (with alot more)
MIT License
74 stars 13 forks source link

Stand alone "executable" #22

Closed sinnbeck closed 4 years ago

sinnbeck commented 4 years ago

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?

iammikek commented 4 years ago

so would that would us the means to run up a 'served' instance for a non Laravel project?

If so, I am up for that.

sinnbeck commented 4 years ago

Not currently no, as a none laravel project does not have config files. I think that way of doing things is more what Takeout is meant to do :) https://github.com/tighten/takeout

The idea here is to simply place a php file called served, next to artisan, so you can use that directly.

I might consider making a none laravel served later on, but my fear is that it will just end up being docker-compose all over again, as I dont know what other php platforms need (php modules and such). Doing it to fit with laravels specs, is alot more manageable :)

iammikek commented 4 years ago

Keeping it laravel specific makes sense. How does served differ from takeout? Is that we’re providing a quicker means to get up and running? The same way homestead is just a plug-in and play version of vagrant?

sinnbeck commented 4 years ago

Takeout sets up your containers using promts. So first you tell it you want to set up redis. Then it asks what port to use etc. And it isnt laravel specific (it just creates containers). It is a global composer package for docker so to say. Also it does not come with php as it is meant to use the php version running on your machine (Valet).

The big difference here is that

  1. Served is laravel specific
  2. Served allows you to set up containers for a specific project that has nothing to do with other projects (like homestead installed for a single project).
  3. Served uses Dockerfiles to make some extra installs to the image, to prepare it for usage with laravel
  4. Served stores all your configuration in a project specific config, making it easy to change stuff and look it up easily.
iammikek commented 4 years ago

Served being standalone (like homestead) is a real bonus for me. Even though I've got native PHP/ mysql running on my Mac, being able to version locking it is the reason I'm using either of these.

How much work do you think it would be to switch over to laravel zero? I've only just come across that, so would be interested in getting involved if its tangible.

sinnbeck commented 4 years ago

I will try making a PR this weekend at the latest. Shouldn't take more than a few hours I think.

sinnbeck commented 4 years ago

Bad news. I read through the documentation and code, and there does not seem to be any way to extend served if I use laravel zero. That is an idea I really want in there (the user can add their own custom service).

I might look into writing my own instead, but I am going to shelve this for now.