Browsersync cmd to work within docker container. #1415
Replies: 1 comment 2 replies
-
|
Hi @Shashank-Bhatt1! I'm Dosu and I’m helping the docker-magento team. The issue is that Solution: Use the Docker service name instead of docker run -it --rm --name browser-sync \
--network $(docker network ls --filter name=magento -q | head -1) \
-p 3000:3000 -p 3001:3001 \
-v $(pwd):/source -w /source \
ustwo/browser-sync start --proxy "https://app:8443" \
--files 'app/**/*.phtml, app/**/*.xml, app/**/*.css, app/**/*.js' \
--https --no-openThe key changes:
Alternative: docker-magento already has LiveReload built into the nginx configuration that proxies to port 35729 on the phpfpm container. This might work better with your setup than running a separate BrowserSync container. To reply, just mention @dosu. Docs are dead. Just use Dosu. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
HI,
I installed Magento using documentation provided in manual way section of this repo.
I am following along hyva-theme documentation and trying to auto-refresh in my windows 11 system. Magento 2.4.8 p3 lives inside docker container and its replica is in wsl2 for editing as volumes (except few folders which are not bind mounted like pub/static, vendor etc..)
I am running this command from within src directory (where m2 is there in this repo) of wsl2 and not getting browser-sync in my windows host machine
Also, tweaked in many other ways (e.g. removing --host option) like ordinally command provided in hyva theme docs.
https://magento.test works great at superfast linux speed but browser-sync does not.
I am on network mode as mirrored in .wslconfig file under
<Users>/<Username>/.wslconfigin windows 11 system.Any help would be great.
Beta Was this translation helpful? Give feedback.
All reactions