Jump to content

Help me stop using shared hosting - what's your VPS/docker setup?


joe_g
 Share

Recommended Posts

Dear everyone,

I've used PW in probably, at least, 100 project the last 10 years. I've been wanting to quit shared hosting since at least five years but I don't have a good idea exactly how yet (as a 1-man company) and I was hoping to get insights and inspiration in your workflows. I've prepared by moving over entirely to Linux, and I'm runing a bunch of VPS's for some personal projects. I also do all my dev work remote, on a VPS. I can set up debian reasonably okay, I think.

My biggest issues are:
1. Every shared hosting has a different interface and different constraints
2. I can't easily copy live -> staging -> test, working with updated data is a manual hassle
3. I currently have no shared hosting that ticks all boxes (in the Netherlands)
4. Since PW is a CMS I have to update the live data-model manually (there is no 'migrate up'). I don't think I can solve this problem through any devops magic, but still worth mentioning as one of the biggest pain points. The answer to this problem might be to step over to Laravel, or similar, I assume.

My goals and hopes are:
-1. (Edit): **FOSS**. I would want to avoid tying up my professional life to any service with tiers and a subscription model
0. **Have the same basic architecture for all projects**
1. Automate backup and restore, and streamline it across all projects
2. Streamline replication from live -> staging and -> test, so I can work on a fresh copy of data without having to use phpmyadmin
3. Have a more robust and portable and setup where I can spawn vps's with a click
4. have a more robust deployment process (better than git-ftp) that is easy to reverse.

I realize this is a very wide devops question, but I'm curious about how you do it - the ones who who took this step away from shared hosting. I know someone who runs a rails shop, and hes using docker/kubernetes - that is probably the answer, I think. But I still wonder exactly how this would apply to PW.

jg

Link to comment
Share on other sites

I think something like ploi.io or runcloud could work for you. I personally use Runcloud but they appear to be moving slower than ploi "feature wise" although it has worked perfectly for all the sites I manage and their support is fair for the paid price. 

Both this services clear your goals from 0 to 4 in one way or another. I also think both has some sort of deployment tool integrated with any git repo (which I don't personally use but i think it's there). 

One "downside" is that ploi doesn't have Apache server configuration they went full nginx though I know there's some crew around here running PW with no issues on nginx. Aside from that, they do seem superior feature-wise.  For example, there you can have db only servers, load balancers. 

The worse part of Runcloud in my opinion is it's  per-site backup service which is a service provided by them, Ploi lets you use your own storage (s3 for example).

4 hours ago, joe_g said:

2. Streamline replication from live -> staging and -> test, so I can work on a fresh copy of data without having to use phpmyadmin

One thing both services have is cloning one "app" into another one, or  another server, at least I can confirm this on Runcloud, but seems to exist in ploi too and it's super handful.

Another way I do this is through CI services (like Github Actions) and basically doing some shell scripting which is not too bad for all the time saved. In the Github Actions I basically rsync template files/modules and run the migrations module through it's CLI but I rarely push actual content since it's managed by a third party.

While on development, I do still use plain old cli mysql import, scp the things or run ngrok to save the hassle of doing previous steps if I just want to quickly demo sth, but tbh it's just lazy on my part I bet it can be easily automated. 

EDIT:  Another trick I do some other times is ssh tunnel a db connection to the actual server. Which is something that moving away from shared hosting makes really simple ?

I am also trying to find the time to explore deployment using docker but well, just a plan for when I have some spare time. 

Check this thread too for other opininons/services: 

 

  • Like 1
Link to comment
Share on other sites

4 hours ago, joe_g said:

2. Streamline replication from live -> staging and -> test, so I can work on a fresh copy of data without having to use phpmyadmin

Not sure this is strictly a shared server issue. I find that I want to update data structures and settings pages, but don’t want to overwrite user-updated pages so database backup and restore (or phpmyadmin) doesn’t work. That’s why I wrote ProcessDbMigrate - still in alpha but usable provided everything is tested first. Or, if you prefer to do it all in code with the api, rather than in UI, there is RockMigrations

  • Like 2
Link to comment
Share on other sites

4 hours ago, elabx said:

I think something like ploi.io or runcloud could work for you. I personally use Runcloud but they appear to be moving slower than ploi "feature wise" although it has worked perfectly for all the sites I manage and their support is fair for the paid price.

Thank you . Had a look and it looks great, however I was hoping to avoid tying up my entire professional life to some service with a subscription model and tiers. I might rather try and go the longer route I think, whatever that means...

Link to comment
Share on other sites

I don't))) I just read "Have a more robust and portable and setup where I can spawn vps's with a click" and it sounds like proxmox. I am happy with my shared hosting for PW sites)

Actually I do not see a need for a dedicated VPS for a site in most cases. Why not put all those sites in one VM with LAMP installed and create new ones copying virtual host configs? You have you backup and everything else in shell scripts or ansible plays. And this way you are not locking yourself in any proprietary thing you try to avoid.

  • Like 1
Link to comment
Share on other sites

33 minutes ago, Ivan Gretsky said:

Actually I do not see a need for a dedicated VPS for a site in most cases. Why not put all those sites in one VM with LAMP installed and create new ones copying virtual host configs? You have you backup and everything else in shell scripts or ansible plays. And this way you are not locking yourself in any proprietary thing you try to avoid.

Was looking into this actually, but then you'd want to isolate the sites from each other which means php-fpm etc. I got it running recently, so its not impossible, but it feels way less robust than some docker based setup. If something is up with apache/nginx ALL sites go down, etc.

  • Like 1
Link to comment
Share on other sites

18 hours ago, elabx said:

Another way I do this is through CI services (like Github Actions) and basically doing some shell scripting which is not too bad for all the time saved. In the Github Actions I basically rsync template files/modules and run the migrations module through it's CLI but I rarely push actual content since it's managed by a third party.

Yes, this helps for deployment and updates. I use git-ftp which is similar in philosophy, perhaps. Was hoping to find a more robust solution with docker, where I can swap containers at deploy perhaps, for easier rollbacks and also maybe quicker to reproduce? But I'm not sure if I actually need this, or I'm making it too complicated.

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...