Static Asset Compilation Comes to Servd

Posted: 3rd Jul 2020

It has always been our intention to make Servd a fully featured solution for hosting Craft sites.

Not just a dumb server, not just an empty space on the internet for you to fill, but an end-to-end partner for your Craft projects.

Today we moved a step closer to that by integrating the most common task which is traditionally offloaded to a third party continuous integration platform: compiling static assets.

We've also tried to make this process as simple as possible. Rather than needing to define a multi-step process, with installation steps, build targets, docker container tags and deployment commands, Servd just asks for two things:

  • The version of node which you'd like to use
  • A node command to run

We've made sure that the most common OS level components are already available for you to use (like image optimisation libraries) and we'll make sure all your node module dependencies are installed prior to running your command.

Once your assets have been built Servd will include them within your bundles so they become part of any deployments using that bundle in the future. The added benefit of this is that roll-backs to old bundles will also roll back all of your static assets without you needing to rebuild them.

Getting set up is as simple as adding your custom build command during new project creation, or into your existing project's Build & Deploy settings. Once added you can create a new bundle to test it out - all of the relevant logs will begin appearing in the bundle creation task logs.

There are a few caveats that you might come across whilst testing out this new superpower, we'll do our best to include everything you need to know in the Servd documentation, but for now just give it a try and let us know what you think.

If you need a partner to handle hosting, deployment, backups and CI processes for your Craft CMS project, Servd will handle it all as your end-to-end Craft CMS project partner with close to zero config required.