Categories
Development Experiences Laravel

From Digital Ocean App Platform to Self Hosted SpinupWP Managed VPS

Earlier this year, I threw together a silly little joke app built on Laravel in a couple of hours. I had merely wanted to participate in the Digital Ocean App Platform Hackathon and had no further plans for the app.

Another App Platform Hackathon participant liked it enough to contribute some substantial improvements, including a shiny new front end built in Tailwind and, more recently, some logos.

Over time I’ve had a few additional ideas for the app, and I’ve been hacking on some of them on the weekends. As the feature set has grown, so have the infrastructure requirements. This past weekend, I needed a database to store the Jokes.

While the original App Platform implementation was sufficient, I wanted something I could customize a bit more in line with my own hobbyist sysadmin experience, managing a site on a server I control.

Enter SpinupWP

I’ve previously blogged about how straightforward it was to move my WordPress sites to my new SpinupWP managed instances, so I wondered how hard it would be to install and manage a Laravel app. It turns out it was a lot easier than I expected.

Disclaimer: I currently work for the company behind SpinupWP. That doesn’t take away from the fact that they’ve built an awesome cloud server dashboard that I am learning fun new things about every day. It is, however, one of the reasons I applied to work there.

The only webserver software I needed to install myself was Node.js and npm to build the Tailwind front end. To do this, I used the NodeSource Node.js Binary Distributions. I had some problems following the default install of the latest LTS version of Node.js, but I got around it by manually adding the apt repository.

sudo add-apt-repository -y -r ppa:chris-lea/node.js

Once that was done, I could follow the install instructions for Node.js LTS (v14.x) on Ubuntu.

curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

Next up, I created a new site on one of my SpinupWP managed servers. Instead of choosing the WordPress install option, I went with the “Clone a Git Repository” option. I entered my Git repo URL, branch name, and any build commands I needed for the Laravel app.

I didn’t check the “Enable push to deploy” option. For now, I’m happy to manually push the “Deploy Now” button whenever I make changes, but I’m keen to set this up next.

All that was left was to create the database in the next step of the new site wizard, wait about 30 seconds while SpinupWP provisioned the new site, add the relevant credentials to the Laravel .env file in the project webroot, and click “Deploy Now”. While the site was deploying, I canceled the App Platform app and set up the new DNS settings to point to the server, and in the space of about an hour, things were up and running.

I know SpinupWP markets itself as specifically a WordPress self-hosted server product, but it was really cool to see that it could manage pretty much any modern web app, with just a few small tweaks.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.