0
votes

I have a CMS service and I have 400 clients that I serve on my own server and 20 on clients' servers.

CMS is versioned and clients can have different versions (1.1, 1.2, 1.3 etc).

I have a dedicated server with apache2 + php fpm I put the application versions into the folder: /core/1.1 /core/1.2 /core/1.3 and then create symlinks to the www folders: /var/www/client1.domain.com/core[symlink] + .env + storage

/var/www/client2.domain.com/core[symlink] + .env + storage

To deploy using: git clone and symlink change in /var/www/*

QUESTION :D I would like change my architecutre to containers (docker, docker swarm) but I am worried about performance. My propositions:

  • build image [1.1]
  • create docker-compose.yml + volume + custom env (with treafik) x 400 instances

or

  • build image [1.1]
  • create only one docker-compose.yml with 1.1 version and dynamically adjust volume (how?) for domains.

what do you think about it?

Sorry for my English

1

1 Answers

0
votes

One of the benefits of using Docker is to run your apps in an isolated environment so if one of your sites / apps has a problem or crashed you can replace it easily without affecting other sites / apps.

Also you can control resource limits for each app so if there is a corrupted one prevent it from affecting whole host machine.

so in my opinion is to run separate container for each site using docker-compose

you can use traefik or Caddy on top of your containers as a reverse proxy.