wowu / docker-rollout

🚀 Zero Downtime Deployment for Docker Compose
https://github.com/Wowu/docker-rollout
MIT License
2.37k stars 66 forks source link

Scale to multiple containers #2

Closed Fumaz closed 1 year ago

wowu commented 1 year ago

Thank you @alexle-dev, I'll look into it!

By the way, can you share what is your case of running multiple copies of same container on a single machine?

Fumaz commented 1 year ago

@Wowu I have a React app behind a Traefik reverse proxy, and I scale it to multiple instances in order to balance the load between all available cores. Traefik takes care of the loadbalancing for me, and it automatically detects new containers.

jokester commented 1 year ago

To add two cents, I also run scaled containers with docker-compose, mostly for service availability.

With docker-compose one can set a ranged port mapping: ports: [ '18080-18090:8080'] (this may be difficult to support as a shell script though) or let multiple container share 1 host port. I have been using the latter for a few times.

martiGIT commented 1 year ago

do you have any plan to implement this?

wowu commented 1 year ago

@alexle-dev I decided to remove --scale flag, as we can detect scale from the running number of container. Let me know if setting scale manually is required for your use case 😃

wowu commented 1 year ago

@martiGIT released in v0.3