Docker Community Forums

Share and learn in the Docker community.

Docker based architecture model? Think webhosting

docker

(Gastrogeek) #1

Hi,

Sorry if this is not the place, but I am struggling to get help on this. Basically, I am trying to decide if and how Docker can be applied to a model, not massively different from the standard/legacy webhosting model… so:

  1. Billing system (could probably be 100% isolated so not too concerned about this)
  2. Application/main SaaS (think control panel)
  3. Multi-tenancy
  4. SFTP support for each user (locked down to specific directory)
  5. SSH support for each user (as above)

Im trying to establish how best to structure this using containers? So, one way might be:

  • Each user gets their very own container with their own DB, storage and instance of an SSH/SFTP server all rolled into one.

However, something tells me this is resource intensive… and goes against ‘microservices’ thinking - so is there a way to do this perhaps like:

  • Each user’s data (files + db for their own app settings etc) are store in a single ‘user data’ container/volume. Then somehow use single db, ssh and sftp server (seperate containers) to automagically map to those data containers on a per user basis via some orchestration layer? I get stuck when thinking about how to dynamically insert a new user? So, I assume I would spin up a user-data container/volume but dont want to restart all my top-level services every time someone signs up? do i?

I realise I could be overthinking it… and could just run as a legacy webhost would… giving each user their own folder on the host server and not even use Docker?

Any help. suggestions etc are most welcomed! (Diagrams especially so ;))

GG


(Nathan Le Claire) #2

A container is just a process. I would not put everything into one container but rather have a separate SSH and SFTP container for each customer. Likewise the associated webapps could each run in their own containers, although I’m not sure how easy it would be to administrate these from another container. DB, I would recommend just having multiple users and databases on the same DB instance that the downstream containers connect to (docker network).