littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
624 stars 112 forks source link

Is SlickStack ever going to support Docker containers? #127

Closed uhlhosting closed 1 year ago

uhlhosting commented 2 years ago

Hi,

Any plans to add docker support to this?

gingibash commented 2 years ago

You will get the ss answer to your question as soon as you run install script

welcome to the magical world of ss where all your dreams come true


< screw containers! excelsior >

    \   ^__^
     \  (oo)\_______
        (__)\       )\/\
            ||----w |
            ||     ||
jessuppi commented 2 years ago

@uhlhosting Thanks for asking.

A few people have brought this up in the past few years, and every time I ask: "Why? What would be the benefits of moving to Docker or providing a Docker option for SlickStack?"...

...and then people just kind of get quiet and don't provide much feedback. I'm not being sarcastic, I genuinely want to know if moving to Docker is better. Maybe people assume I'm mocking them, but I'm truly not.

The entire reason I got into LEMP stacks several years ago was because I'm an SEO/marketing guy and everything I found in terms of web hosting for WordPress was either too complicated for me or too proprietary. I'm not a computer engineering guy so I wanted something that was simple and didn't require tons of maintenance, and after I open-sourced SlickStack I knew tons of other developers felt the same way (e.g. primarily "frontend" guys who had no interest in spending a decade of their life mastering "backend" programming languages and so forth).

Simplicity, portability, reliability... Bash achieves all of these. I'm not a Docker expert, but what I know is that Bash comes preinstalled on all Linux machines, and Docker does not... it is an extra layer of "bloat" or dependencies.

I always try to keep an open mind but I also feel like nobody has explained why Docker achieves these goals better than a collection of well-refined Bash scripts?

It seems people like Docker so they can dump 100 instances of e.g. SlickStack on the same server... but that is pretty much the opposite of our philosophy here which is that cloud VMs keep getting cheaper, so why do we need to keep dumping dozens or hundreds of websites on the same machine?

In my mind, the cloud VM is the new Docker... KVM to be more specific. And if predictability is a concern, Ubuntu LTS is the most predictable OS every created with the most predictable/uniform package management.

Docker would mean SlickStack can no longer be easily moved between VMs and operating systems, which is ironic since that is the entire idea of a container. Perhaps local development is another reason, but I seriously don't understand how using Docker improves local development for something as easy as WordPress.

Also, since our "cron jobs" are a core feature here (retrieving various scripts from GitHub automatically) moving to Docker could mean that a single cloud VM (IP address) was sending thousands of requests to GitHub/GitLab every hour or even every minute which might cause it to be banned, or other problems...

I will probably leave this Issue open for a long time to invite debate, because I'd really like to hear more...

hwcltjn commented 2 years ago

I like Docker, I think it's great and I see why some would want to see SS on docker but in my opinion, I'm not sure it's a perfect fit for SlickStack.

It's ideal for the more complicated scripts/web apps/software that have several dependencies and requirements like node, Mongo, Redis, Java, etc... but WordPress is relatively simple, it's just Nginx and PHP.

Further, combining SFTP/FTP with docker isn't going to be as straightforward, neither will port and/or network usage.

Simplicity, portability, reliability... Bash achieves all of these. I'm not a Docker expert, but what I know is that Bash comes preinstalled on all Linux machines, and Docker does not... it is an extra layer of "bloat" or dependencies.

100%

It seems people like Docker so they can dump 100 instances of e.g. SlickStack on the same server... but that is pretty much the opposite of our philosophy here which is that cloud VMs keep getting cheaper, so why do we need to keep dumping dozens or hundreds of websites on the same machine?

This.

uhlhosting commented 2 years ago

This is true, I agree with you, yet in todays fast paced world micro services are the way. The same like bash its preinstalled, in some OSes so its docker, or Kubernetes would be also to ingest this, and thus allowing one to scale and developer vertically not in a liniar way.

Anyhow, I see and read all your points, clearly my intention was never to run 100 instances on same host, yet more to add more portability to it, just thus we cannot compare a shell manager to a full fledged app like docker, also shell scripting is still scripting and still requires one the knowledge to do so, and to its users, the knowledge to at least be able to read its content.

About microservices, once they are setup, and in place, they simply work. Speaking about scaleability built in this is not something bash has, yet docker has with Swarm, and if youd look into a proper WP stack, its nowadays way more than just Wordpress and PHP, tell me more of microcaching/pagespeed, redis cache, memcached, and so on.

So thats my side of story, glad this wasnt left to first reply only, because alto were all free to express ourselves, let it be constructive at least! accepting new is hard for many, yet sometimes is the only way forward, without getting stuck in our own time loops, and gradually keeping everyone around us i same loops.

Good luck with what ever you will decide, to port or not port, I lately discovered Caprover, and i am giving a chance since such projects do require all my attention when it comes to Open source, those who have a source, and they open it with the idea to share its great, yet if they are stubborn and do not seek the emerging technologies, will become obsolete very fast. By the oposite docker makes devops lifecycle much easier.

Alto docker its owned app, so its most of our OSes, this does not stop us from using them, and just becasue winndows 95 was simple, it does not mean we still use it, no matter if free of not. FOSS should really be about collaboration, expressionn and appreciation of ones point of view. Have a good one!

jessuppi commented 2 years ago

@uhlhosting I appreciate your feedback but it sounds more theoretical rather than practical, which is what I have noticed in the past when people ask about SlickStack using Docker.

Have you tried SlickStack yet, and if so, what did you think it lacked in terms of portability? Currently it supports any Linux machine in the world that has root access (as long as you disable the OS check snippet in ss-install). To people like me who are not predisposed to Docker, that is portability that is immediately practical.

You also mentioned concerns about scalability... have you load-tested SlickStack as it scales pretty well I think?

About microservices, once they are setup, and in place, they simply work.

I guess my perspective is that setting up Docker and knowing how it works is beyond most WordPress developers. But practically anyone can search Google for a Bash snippet, with tutorials from 1995 still (mostly) accurate. I used to joke that SlickStack is the "Flappy Bird" of DevOps tools, as I think minimalism still works in this context.

It seems like many Docker fans come from the mindset that unless a project users Docker, it's not scalable or portable, which is simply not accurate. SlickStack is both, and easier to use, I would argue.

It's the same as those who accuse WordPress of not following the "12 factor app" philosophy... forgetting perhaps that WordPress has been around a lot longer, and is still the king.

Anyway if anyone else has feedback re: Docker please comment anytime (now or in the future).

arielferdman commented 2 years ago
  1. Easily install more than one website on a single vps.
  2. Self heal / recovery - if any service in the stack fails, docker can easily be configured to restart the container and bring it back up without any manual intervention.
  3. Easier to monitor and profile - since the stack is made out of many different processes - having a dedicated container makes it easier to find errors / bugs since all metrics and logs are seperated by process, by design.
jessuppi commented 2 years ago

Thanks for the feedback @arielferdman

In the case of SlickStack, every single Docker container would be sending hundreds of requests to GitHub servers, do you think a Docker approach with potentially thousands of wget requests each 5 minutes could work?

Self heal / recovery - if any service in the stack fails, docker can easily be configured to restart the container and bring it back up without any manual intervention.

I was not aware of this benefit, it does sound pretty interesting, not sure how easy to configure it this way?

Re: monitoring and processes, I would argue that it's still easier to have a single site per VM because then you know every single process and resource is being used only by that one website.

jessuppi commented 1 year ago

To help cleanup our open Issues on GitHub, I'm going to close this for now since Docker isn't going to happen anytime soon, but if any serious developments in the future maybe we can open this again... thanks!

jessuppi commented 10 months ago

Some related Docker discussion here:

https://lowendtalk.com/discussion/183972/update-on-slickstack-project-and-thanks-to-let