Scaling a service: three api containers
Select an icon to see what it is.
Step 5 of 6
What stops a service from scaling
A fixed container_name can only belong to one container, and a fixed host port like 3000:3000 can be bound only once. A fixed container_name is refused up front, and a fixed host port makes the second replica fail to start. Pinning an ipv4_address also cannot be shared by two containers, which is why api has no static address here.
Typical errors
container_name set: can't set container_name and api as container name must be uniqueports: "3000:3000": Bind for 0.0.0.0:3000 failed: port is already allocatedfix: remove container_name, publish a range, or put a proxy in front