You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to be able to have two (or more) of this project running at the same time on a single domain name (e.g. example.com and panel.example.com)
Since I don't fully understand the whole setup Caddy Mercure and stuff I came up with the idea of using an Nginx reverse proxy with a config to redirect let's say example.com on port 8000 and panel.example.com to another port for two sparated symfony-docker images.
I don't know if its best practice but i already run something on my VPS on an nginx container for redirection.
actualy the only way i found was to configurate only one port in the compose.yml like that:
ports:
- target: 443published: 8000protocol: tcp
so localhost:8000 is working but I don't think its a good way to do it since in prod i'll force http https and http3 to use 443 port (actualy i don't realy know if its a problem but since there's 3 port config for 3 diffrent protocols maybe it matter)
Question:
Is there a way to setup multiple diffrents symfony-docker projects for a same domain name and should I try to configure Caddy or make my own reverse proxy.
The text was updated successfully, but these errors were encountered:
If I understood the question correctly, this issue can be solved by using Caddy-Docker-Proxy, Traefik, etc.
I can also suggest considering the possibility of running two projects under different domains on one machine.
For this, you can use the 127.0.0.1/8 subnet. When configuring port publishing with the host_ip attribute or the com.docker.network.bridge.host_binding_ipv4 option when creating a network, you can specify a specific IP address from the 127.0.0.1/8 subnet and place the service on it. In this case, the target ports should not be occupied on 127.0.0.1, since this will not allow publishing ports of the entire rest of the subnet.
Then, via /etc/hosts, you can configure the relationship between the configured domain and the IP address selected for the project.
I want to be able to have two (or more) of this project running at the same time on a single domain name (e.g. example.com and panel.example.com)
Since I don't fully understand the whole setup Caddy Mercure and stuff I came up with the idea of using an Nginx reverse proxy with a config to redirect let's say example.com on port 8000 and panel.example.com to another port for two sparated symfony-docker images.
I don't know if its best practice but i already run something on my VPS on an nginx container for redirection.
actualy the only way i found was to configurate only one port in the
compose.yml
like that:so
localhost:8000
is working but I don't think its a good way to do it since in prod i'll force http https and http3 to use 443 port (actualy i don't realy know if its a problem but since there's 3 port config for 3 diffrent protocols maybe it matter)Question:
Is there a way to setup multiple diffrents symfony-docker projects for a same domain name and should I try to configure Caddy or make my own reverse proxy.
The text was updated successfully, but these errors were encountered: