profile

Tech Guidance for Non-Technical Founders

Portable applications


Today one of my clients asked me how they can duplicate their whole application to run in the UK. This came from a request from one of their customers to satisfy GDPR laws.

When I first set up their application to run in Australia I did it via tools and programming languages (Infrastructure as Code.)

This means that we can deploy the UK instance in a couple of hours, because we just need to change a couple of configuration variables, update our deployment pipeline to deploy to both regions, and import the database.

The real point here is that deploying application infrastructure should not be a pain point. You should be able to do it without much thought, as many times as you need.

Here are 5 things to be aware of when preparing your application for repeatable deployment:

  1. Make sure all URLs and paths handled by the application are relative. This means the full URL or path is generated on the fly in relation to the actual location in each application instance. The actual location is stored in config (see point 2). An example would be storing a path of an uploaded document. Instead of storing the full path, store the filename and configure the application to look for it in the known location for uploaded files.
  2. Keep configuration completely separate from application code. It may be updated with code deployments but it should exist independently.
  3. Following on from the last point, the application code should make no reference to its location or environment. In other words, the application may perform differently in Staging or Production but this difference should be encoded as a mode or feature, rather than as a result of its location.
  4. Use “vanity” DNS records to separate the public access point from the internal endpoints. This allows you more flexibility when changing things.
  5. Deploy your application infrastructure using a repeatable method. Ideally Infrastructure as Code. If not that, via a script. If not that, write a detailed document as a guide (aka WikiOps.)

Of course there are more things to be aware of, but keeping these in mind when designing your application will save you a lot of pain in the future.

Tech Guidance for Non-Technical Founders

A daily newsletter on building software products for non-technical founders. Give me two minutes a day, and I’ll help you make technical decisions with confidence.

Share this page