e-motion-apps / e-motion-api

Escooters availability map application made by interns.
https://dev.escooters.blumilk.pl/
3 stars 2 forks source link

Multiplatform app compatibility #166

Closed Lee0z closed 11 months ago

Lee0z commented 1 year ago

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: image

But there is problem with our project:

I asked my friend to try it in his enviroment (MacOS / Macbook Air M1) and he faced same issues as mine.

mtracz commented 1 year ago

@Lee0z What server's IP/port is listed in service in the Traefik in your case? (Servers section)

image

What's requested address for Vite client in dev tools?

image


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

Lee0z commented 1 year ago

Server's IP/port is: 172.18.0.4:80

image

The address for Vite client is the same as in terminal. image

image

I've seen these docs and didn't manage to fix any issue:

AleksandraKozubal commented 11 months ago

There is no need to keep this issue open, so I'm closing it.