More that one project on the same server

Wappler 6.8.0
node.js
Windows 11
Docker/Traefik
EC2 on Amazon
DNS (Cloudflare)

I have two projects (a landing page and another app) sharing the same host target! Each on port 3000 and 4000.

When running on localhost, everything is fine! But when I deployed, I saw in docker that they are on the same port 3000!

Does anyone have any suggestions on what I can do to change the port in the remote configuration?

Thanks!

tks!

Have you tried changing the port numbers under Project Options -> Targets? Maybe you just need to change the port numbers there for just one of the projects?

sure! already maded this! im lost!

Just to be clear, you've not only changed the port numbers but redeployed? During deploy, Wappler seems to build its Docker run command from various settings within your project. I'm just guessing here that the remote run command during a deploy involves the assigned port number for your intended target.

yes, naturally.

To install Traefik, we have to remove the port assignment in our Wappler web target configuration. When I look at my remote server using 'docker container ls', I see my web container running on port 3000. So I can imagine that having a second project with the same remote target and Traefik installed, it too would try to run on port 3000.

Maybe this is a Traefik configuration since it appears we give Traefik control over port assignments during install?

1 Like

Traefik doesn't need the Docker container to have ports published, it can directly access the container's IP address and therefore have access to all ports of the container

This is because Traefik is connected to the same Docker network as the containers

one of projects (project 2) give this error: "bad gateway"

image

project 1:
www.zzzzzzzz.com

project 2:
lp.zzzzzzzz.com

Hi Alexandre,

Are you using Resources Manager to deploy the projects?

I have a remote server for dev sites where I have deployed more than 1 docker project. There's no need to change any port config in the remote target project settings. Traefik manages the SSL and routing internally on the remote server.

The issue could be from specifying the IP addresses in the Web Server URL field in the remote target settings, instead of specifying the full domain names of the websites (e.g. http://abc.com or http://xyz.com). This could be creating a conflict with the port number 3000 as each docker deployment uses this port internally.

1 Like

Ok Guys!! It works!!! I leaved port 3000 on both projects!!! Thank you for all!!!

2 Likes