SiteHost

Automatic Container Updates

Container Maintenance is a feature for Cloud Container servers that utilise our Server Management product. This feature ensures that your containers are updated to the latest stable version of their image automatically when we release them. This is done during a maintenance window that you select for your websites. If your server is not currently managed by SiteHost please get in touch with us to arrange a management package.

Overview

When important security patches or bug fixes are available on our standard SiteHost web images, we will release a new version of the image. Once a week, at the time specified in the server maintenance window, all your web containers will check for new image versions. If available, we will automatically update the image on the container and restart it with very minor downtime for your site, usually just a few seconds.

All existing web containers will be automatically enabled for Container Maintenance. New web containers added will also have this feature enabled by default.

Container Maintenance cannot be removed for Integrated Containers.

How to enable this Feature?

Setting the Maintenance Window

  1. When logged in to the SiteHost Control Panel, click the Servers module from the menu on the left.
  2. Select a managed Cloud Container server from the list to open the its management page.
  3. Click the Maintenance tab.
  4. Select a Day and Time for the maintenance when your websites get the smallest number of visitors. Usually in the early hours of the morning.

Opting a container in or out

  1. When logged in to the SiteHost Control Panel, click the Containers module from the menu on the left.
  2. Select a Container hosted on a managed Cloud Container server.
  3. At the bottom of the Container's management page page, you can enable or disable Container Maintenance.
  4. Click enable or disable accordingly to apply changes.

Technical Details

Your Configuration Changes

As you may already know you can make changes to your container configurations by editing the files in the /container/config directory. During an upgrade, we will attempt to keep any changes you have made by merging them with the new configurations. If this process fails for any reason the update will be reverted and nothing will change on the current Container.

Health Check

To validate an update has been applied successfully to your container we make a request to the homepage of the containers website based on the main domain you have specified. If we get a successful result from this (200 OK) then we continue with the update process.

If we get any other result we assume something has gone wrong and will cancel the update reverting to the previous state with no changes. This health check is quite basic however so we have included a method for those of you who want to build out a more robust health check yourself. You can implement a custom JSON endpoint at /.sitehost/health which returns the object {“status”: “healthy”} as the response. Anything else is assumed to be unhealthy. If the custom JSON endpoint returns 404 or redirects to another page, we will fallback to the homepage.

Redirects, Aliases & SSL

If your site has multiple virtual hosts, but redirects users to your primary domain, the health check will follow all 301 and 302 redirects as long as the redirect target host is a virtual host on the Container. Redirects outside of your Container will fail the health check. The health check will honor HTTPS requests by setting the appropriate headers.