Closed Lee0z closed 11 months ago
@Lee0z What server's IP/port is listed in service in the Traefik in your case? (Servers section)
What's requested address for Vite client in dev tools?
Vite docs:
Accessing the server on WSL2 from your LAN
When running Vite on WSL2, it is not sufficient to set host: true to access the server from your LAN. See [the WSL document](https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-a-wsl-2-distribution-from-your-local-area-network-lan) for more details.
https://vitejs.dev/config/server-options.html#server-host
So you could play with this port proxy stuff https://learn.microsoft.com/en-us/windows/wsl/networking#accessing-a-wsl-2-distribution-from-your-local-area-network-lan
Server's IP/port is: 172.18.0.4:80
The address for Vite client is the same as in terminal.
I've seen these docs and didn't manage to fix any issue:
server: {
host: Object.values(networkInterfaces()).flat().find(i => i.family === 'IPv4' && !i.internal).address,
port: process.env.VITE_PORT,
},
There is no need to keep this issue open, so I'm closing it.
I've tried to run project in my main enviroment which is Windows 11. There is one main issue,
npm run dev
doesn't work as intended inside container.I'm using Docker Desktop and WSL2 (ubuntu 22.04).
Traefik is indeed working in Windows browser:
But there is problem with our project:
Terminal output is fine:
App isn't responding: (escooters.blumilk.localhost) (Vite dev server)
I asked my friend to try it in his enviroment (MacOS / Macbook Air M1) and he faced same issues as mine.