Mr Treublaan 1-3
1097 DP Amsterdam
The Netherlands

An Online / SaaS platform, scalable, safe and fast | The Docker container architecture: a prototype

25 Jan, 2019 Drupal

Home Blog An Online / SaaS platform...

In order to be able to scale an SaaS Platform safely and stably, a good dose of dev-ops knowledge is required: a fast, scalable Docker container structure is essential for the online application. We develop online platforms in which an infinite number of customers can work in isolated environments: one central SaaS platform, an infinite number of customer environments. What does this software architecture look like? A prototype:

Why is a Docker container foundation needed? Read here.

What can the Docker container architecture look like for an SaaS Platform, a concept:

Generic information

  • This concerns the container architecture for a SaaS application in which, fully automatic, infinite environments can be generated: a subdomain per customer is created, but also infinitely many main domains can exist in this.
  • The SSL certificates are automatically generated and extended for each environment with LetsEncrypt.
  • After initial production, constant optimization of this container architecture will be necessary to keep the online platform safe, fast and stable. And so that the server costs continue to fit into the business model.

Architecture of Docker containers

First of all, the entire container architecture must be given a stable operation, even without the actual application: all Docker containers and automatically generated container sets must become stable in one platform.

Further necessary tasks so that unlimited new, isolated application environments for customers can be generated:

1. ‘Bash script’ development

As soon as a new environment for a customer needs to be created, this is done with the help of a custom Bash script, which among other things has to perform the following tasks to generate a new container set:

2. ‘Docker gen’ container

The Docker Gen tasks:

  • Forwards the 'Gateway proxy' (Nginx in Gateway container set) routing for the new environment.
  • Creates Virtual Host.
  • Generates Nginx config for each environment.
  • Reads the generated environment variables from all 'Application container sets'.
  • Creates Docker containers in relevant application set, which get the correct environment variables.

3. SSL Tasks container in 'Gateway container set'

  • Creates SSL certificates via LetsEncrypt
  • Docker-gen ensures that the correct SSL certificate is linked to the relevant environment.
  • Automatic renewal of the SSL certificate for all domains, also via the LetsEncrypt API.

4. Interfaces between custom SaaS application and open source code

  • The majority of the application code lives in the containers 'PHP / Web application' and 'NodeJS'.
  • This custom application code has to interface with all other containers within the 'application container set' to get the integral SaaS platform working.
  • The Proxy / Nginx container works as a router: all traffic within the 'application container set' he handled.

Many of these containers are available open source but the architecture to develop this container platform as described is not available, we will have to develop it to measure, test and iterate.

And, before you can start producing this architecture, a prototype will first have to be made, in which a lot of research, configuration and testing is required.

You also can not escape the development of custom containers, because not all containers are immediately available, or work as desired out-of-the-box.

Wrap up

So far Docker container structure concept for an online SaaS Platform. We previously realized platforms in which this architecture was implemented.

Our experience is, to get this working properly, you need a specialist software development team. Where everyone can think full stack, but specializations are divided. These software specializations are necessary to get such an online platform safe, stable and scalable. So, call us if you need us ;)

Written by Joris Snoek | Jan 25, 2019
Let's Talk

Please tell me all about your project!
Mail , or send a message:

Got some more time?

Related content
09 May, 2023 Drupal

Save time, frustration, and potential content loss.


07 Jun, 2021 Drupal

Programmatically in multiple Views


02 Jun, 2021 Drupal