Web Hosting Dramas

When most of us thinking of hosting our website, most of us wouldn’t have considered Google Cloud Platform as a viable choice - since we want cpanel, a manage platform - support and the ability to setup email and such.But in the days of gmail, the need of a domain hosted email address might not be so critical so having a domain and hosting - without the serious need of a IMAP/POP3 account for email makes life easier.I was in a situation, for myself I needed a good web hosting provider - cheap (up to $5/mo) and most importantly one that supported the new structure of Statamic 3 requiring the ability to change the public_html/ folder to public_html/public/ … Something that I’ve found basically no standard … affordable web hosting provider does! Even if you’re willing to pay up 10yrs hosting in advance!_So I was a situation, I had to host my website, but it had to be flexible to change the public_html folder to a subfolder _and be affordable long term.So I went looking around, came to the conclusion that I was not going to make it happen, so I looked at VPS solutions - that were affordable. But I preferably needed a email redirect setup - something easily done on cPanel, but does require some setup on Linux.So here I am looking for a low cost VPS or something similar.Then I take notice of Google Cloud Platform and then watching a youtube video, which gave me a good run down on how to use it and paired up with my exisitng Debian Linux server experience (i have my own linux server at home) I figured I was able to run my server on this … _maybe?_So there are some caveats;

  • You will need to have a credit card on the account.
  • The server is slow, like 1vCPU and 614MB memory slow. The idea is it’s a tiny webserver that will allow you to run simple static websites, small things - maybe a small php script or two - that kind of thing.Trust me, 614MB memory is NOT enough to install Statamic3 (after installing PHP7.x, Apache2, composer and such..) but it is enough to keep us within the Free Tier on Google Cloud.With the f1-micro VM you have 30GB max storage, which does allow you to install a 3G /swapfile. Which does allow the system to use that as “RAM” when the RAM itself is used up (which installing Statamic 3 via composer can do easily.)So I have a f1-micro (1 vCPU, 614MB, 30GB) installed with Debian 10 x64 with a 3GB swapfile, which does allow Statamic3 to work - I’m even writing a full installation script.Its not entirely perfect, I can’t update within Statamic itself - using the Panel, I go into console and ssh in and write a script to take over the statamic3 installation, update it and hand it back to www-data.It’s a work in progress.