It’s my first time with rancher, i use it with version 0.63 and i have wait for the version 1.0
I try today to install two wordpress from the catalog.
The first wordpress is OK
But the second display an error of binding the port 80.
so after checking, i have change the port mapping (from the UI) for the first wordpress, but when i do a docker ps it’s always port 80
Here is the example
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a0fa23f389c6 mariadb:latest “/docker-entrypoint.s” 17 minutes ago Up 17 minutes 3306/tcp r-wordpress2_db_1
7e863020cbbd wordpress:latest “/entrypoint.sh apach” 19 minutes ago Up 46 seconds 0.0.0.0:80->80/tcp r-wordpress_wordpress
I change the 0.0.0.0:80 to 0.0.0.0:6666 in the UI but it’s not changing do you know this issue?
But if i would like to deploy two wordpress. The first one start ok, the second one display this error
Stopping (500 Server Error: Internal Server Error ("failed to create endpoint c340f246-4db7-4dc3-ab63-a27bf4be3aee on network bridge: Bind for 0.0.0.0:80 failed: port is already allocated")) Host:
So i don’t know what i can do
To achieve what I think you want, copy and paste the docker-compose.yml and rancher-compose.yml from the Wordpress App and create a new Application, paste those, then change ports: 80:80 to ports: 80. This will select a random port, then put a load balancer in front of it.
@caradou How many hosts do you have that have port 80 available for the wordpress app? It sounds like you only have 1 host available, but you want 2 services to use the same port on the host, which is not allowed.
You can opt to not expose any ports on the wordpress service. Add a load balancer to point to the wordpress service and use a source and target port of 80. Then the load balancer would direct the traffic from the single host at port 80 to the wordpress service and round robin between container A and B of the wordpress service.
You don’t need to publish a port at all in the wordpress container. A load balancer talks to the container over the overlay network and can talk to any port the container is listening on.