Posted in Tutorials ยท 10 min read

Building scalable websites with ProperHost Cloud

Sindre M.
Sindre M.
Founder, ProperHost.com

ProperHost Cloud makes it easy for developers and website owners to build, manage, and scale applications and websites without having to manage the underlying infrastructure.

In this article we'll take a look at the general concepts and features of our cloud hosting platform.

ProperHost Cloud
ProperHost Cloud

What is ProperHost Cloud?

ProperHost Cloud is a modern web hosting and application development platform. It blends novel cloud technology with a set of best-practice workflows and tools that excel far beyond traditional web hosting services.

Built on top of Kubernetes, microservice containers, and Google Cloud, we're able to offer highly performant and scalable hosting for a wide variety of use cases.

Our platform streamlines the end-to-end application delivery lifecycle from code to cloud with built-in CI/CD (continuous integration and delivery) and deployment automation. ProperHost also offers advanced team collaboration features, which makes it easier for organizations to implement a good DevOps strategy.

Key features of our platform include:

  • Pre-configured application stacks for WordPress, Magento, and more.
  • Managed hosting based on microservice architecture.
  • Developer-friendly deployment workflow.
  • Integrated CI/CD pipeline (Git push-to-deploy).
  • Simple horizontal scaling.
  • Self-healing application containers deployed on Kubernetes clusters.
  • Free (and automated) SSL/TLS certificates for all domains.
  • Beautifully designed custom Dashboard.
Click here to sign up for a free account

Core concepts

Before we dive into each individual feature, it's helpful to get a basic understanding of the different parts that make up our platform.

Application stacks

When you create a new site through our dashboard, the first step is to select the type of application you're building. At the moment, ProperHost Cloud supports the following web applications:

  • WordPress
  • WooCommerce
  • Magento Commerce
  • OpenMage LTS
  • Drupal
  • Laravel

The application determines the technology stack that is going to be provisioned, as well as a set of build automation rules. For example, in the case of a Magento 2 site, the platform will create components for PHP, NGINX, Elasticsearch, Redis, and Varnish.

ProperHost maintains the runtime environment, saving you time by installing and configuring the application's system requirements.

Architecture

ProperHost Cloud is based on a microservices architecture. Each service (component) is deployed as a container in the cloud and logically grouped together as an Application or Website.

The loose coupling of services allows for easier deploys and more flexible scaling options, as well as a more secure and fault-tolerant hosting infrastructure.

On the flip side, your application no longer runs on a single, monolithic server. Each application component can run on different nodes in a cluster and can even be scaled out to multiple replicas across any number of nodes.

This means you don't get SSH access and you can't install custom software on the server.

The container filesystem

Containers in a Kubernetes cluster are by definition stateless. They use an ephemeral file system, which means that any file changes made after the container started would be lost after a restart. This important design constraint is part of what makes containers lightweight, portable, and scalable.

For applications that write to files, we provide persistent storage volumes. Volumes are similar to disks, but are dynamically provisioned for each application and backed by a storage pool.

Hence, it's important that you only write to a persistent folder and not the container file system.

ProperHost Cloud incorporates many of the ideas described in the twelve-factor app methodology but extends the model with additional features specifically tailored for stateful web apps.

Workflow

When building websites, or software in general, it's important to have a good development process in place. A consistent process helps reduce mistakes and makes you more productive. The way we do this is through automation and current best practices.

Step 1: Write code

ProperHost recommends a local development environment using Git for version control and "Git push" to deploy code. When you create a new site it includes a built-in Git repository for your source code. Simply clone the repository to quickly get up and running.

Step 2: Deploy with Git

The moment you push your files to ProperHost Cloud it triggers a new build. During the build phase, the CI/CD pipeline goes through a series of steps that prepares the application for deployment. It may install dependencies through a package manager such as Composer, NPM, or pip. Sometimes it also includes a code compilation step or additional processing, such as running a Node.js Webpack build.

The CI/CD job usually takes a couple of minutes, after which the updated build is pushed to the cluster. By default, the new version is made live before the old one is terminated in order to support zero-downtime deploys.

Step 3: Promote build to production

If your plan includes a staging environment, the new build isn't automatically deployed to production. Only the staging version of the site is updated when you push a change. To make the changes "live", you need to promote the build to production.

Configuration management

Principle 3 of the 12-factor app methodology states that application settings should be stored in environment variables rather than constants in the code. By separating config from code, it's easy to change variables at runtime between deploys, and there's less risk of accidentally storing sensitive information such as credentials in the code repo.

ProperHost Cloud makes it easy to manage application config through a web UI. Every site supports custom environment variables, which are injected into the application at runtime. Environment variables can be set per environment, allowing you to apply different settings in staging and production. When you make a change, it automatically reloads the application container to pick up the new value.

Add-on services

Websites may use addon services to implement certain functionality, such as databases or other backend services. ProperHost Cloud currently supports the following add-on services:

  • MariaDB/MySQL
  • Elasticsearch
  • Redis
  • Varnish

Addons can be enabled when first setting up a site, or later through the Site Addons tab. Depending on the application, certain addon types may be required, in which case they will be pre-selected.

In most cases, the application will detect whether or not an addon is available and reconfigure itself automatically. Things like connection details and other settings are managed by the platform and are unique to each environment.

Domain routing

By default, every site is assigned a temporary domain name. This allows for easy testing and development, but it's strongly recommended to add a custom domain before going live and remove the temporary domain.

When you add a domain to a site, we automatically install a Let's Encrypt certificate to support secure HTTPS out of the box, but you may upload a custom SSL certificate if needed.

Sending email

ProperHost is not an email service provider. We do not provide you with an SMTP server, and you cannot receive email using our services. This may be perceived as an inconvenience by some, but we believe it's bad practice to host your email together with your website. Setting up a third-party email service provider is easy and will give you fewer problems down the road.

Most web applications allow you to specify an SMTP server, but to make the integration easier with legacy websites, we provide an SMTP wrapper for the sendmail utility. Just add your outgoing mail server settings through our web UI, and you'll still be able to use PHP's built-in mail() function.

The Web UI

The ProperHost Cloud Dashboard is where you manage every aspect of your website and services.

If you already have an account, you can log in here:
https://cloud.properhost.com

Or click here to sign up for a free account.

Once you log in, the first thing you'll see is a list of all your sites:

ProperHost Cloud: Dashboard
ProperHost Cloud: Dashboard
Note
If you're a member of an organization, you can quickly switch between your organizations' and personal sites using the drop-down menu located in the top left corner.

Account settings

Click on your profile picture in the top right corner, then click on "My Account". This is where you change your profile information, manage authentication keys, update your payment details, etc.

ProperHost Cloud: My Account
ProperHost Cloud: My Account

Site Dashboard

Click on a site to get into the site management area. We'll quickly go through each of the sections below.

ProperHost Cloud: Site Dashboard
ProperHost Cloud: Site Dashboard

Quickstart

A quick guide that shows how to access the site and how to get started with our platform.

Activity

Shows recent Git commits and deploys.

Deployments

Shows information about the currently deployed build. It also gives you the option to view past deploy history and rollback a build.

Domains

This is where you can add custom domains to your site. When you add a domain, you can choose to upload a custom SSL certificate. By default, a free Let's Encrypt certificate is installed. You can also choose to redirect all traffic from "www" to "non-www" or vice versa.

Users

If the site is created as part of an organization, you can grant other team members access here. Each user can be assigned a specific role, which determines their access level.

From this section, you can also add additional SFTP users.

Jobs

This is where you manage cron jobs for the site. Jobs are defined using YAML syntax.

jobs:
  - name: my_job
    schedule: '*/5 * * * *'
    command:
      - curl
      - https://url-to-site/script.php
  - name: another_job
    schedule: '@daily'
    command:
      - echo 'Hello World'

Some applications will come with cron jobs pre-configured when you create a new site.

Addons

This is where you manage the add-on services for your site. Click on a particular addon to bring up additional details, access credentials, etc.

Settings

The settings section contains various configuration options for your site. This is where you can customize the NGINX config of the web server, set your external mail server settings, and more.

Advanced settings

Resources

The resources section shows the current CPU, RAM and disk usage of your application containers and services.

Logs

This is where you can find log output for each application and service.

Variables

Depending on the application, you can use environment variables to control various settings and options. Refer to the details in our docs to find out which variables are supported.

Snapshots

Snapshots are point-in-time backups of your site. Snapshots allow you to easily restore entire environments and quickly recover from errors. A snapshot is created every night.

Alerts

(Organizations only)
ProperHost can send notifications to Slack, email (or both) in case there are issues with your site.

Billing

This is where you'll find details about your current subscription and past invoices.

Web Terminal

Sometimes it's useful to obtain a shell into the running container, whether it's for debugging purposes or to run one-off admin tasks (ref. principle 12 for 12-factor apps).

ProperHost Cloud: Web Terminal
ProperHost Cloud: Web Terminal

Get all of our updates directly to your inbox.
Sign up for our newsletter.