Closed hagmann closed 4 years ago
@hagmann which dockware image are you running? And how did you start the watcher? and how does your ports section look like in your docker-compose file?
@martinweinmayr
Dockerfile:
version: "3"
services:
shopware:
image: dockware/dev:latest
container_name: shopware
ports:
- "80:80"
- "3306:3306"
- "222:22"
- "8888:8888"
- "9999:9999"
networks:
- web
environment:
- SW_CURRENCY=CHF
- XDEBUG_ENABLED=1
- XDEBUG_REMOTE_HOST=192.168.99.101
networks:
web:
external: false
I started the watcher using
cd /var/www
make watch-storefront
@hagmann which dockware version?
dev/contribute/essential?
shopware version? 6.3.0?
@martinweinmayr
dockware/dev:latest Shopware 6.3.1.0 (Updated in the Administration)
just to be sure, in the .env you have SHOPWARE_HTTP_CACHE_ENABLED=0 ?
APP_ENV=dev
APP_SECRET=1
INSTANCE_ID=1
DATABASE_URL=mysql://root:root@localhost:3306/shopware
APP_URL=http://localhost
MAILER_URL=smtp://localhost:1025
COMPOSER_HOME=/var/www/html/var/cache/composer
SHOPWARE_ES_ENABLED=0
Hi,
I have the same problem after I updated Shopware to 6.3.1.0 in the administration (#10).
@martinweinmayr I checked your suggestion and add SHOPWARE_HTTP_CACHE_ENABLED = 0 but but unfortunately the error still exists.
we will pack sw 6.3.1 on monday, i think then we will also see what the problem ist ... Normaly a admin update should not be that problem as it is based on production theme.
I'll give you feedback latest on monday, maybe already today
ps. on my site it works well... Strange
in the and of the process you see something like that?
and if you change a scss file it reloads automaticly? right?
ahhhh i see on the 1st image they try to open 9998. This should not happen if you really use our make command. @hagmann
If you do it your way you have to map the port 9998:9998 in your ports section of the docker-compose file.
@martinweinmayr I actually followed the docs so I am not sure what it tries to use port 9998 instead of 9999. Both ports are now mapped in docker-compose.xml and forwared to the docker machine. But resources are still now proxied to one of these ports.
The compiler itself works flawlessy.
compiler and watcher works now? "compiled successfull" is also the result of watchers ...
@martinweinmayr As mentioned in the first post, the compiler always worked. The issue are the resources that are not being loaded through port 9999.
if the watcher would work you should see the message "compiled successfull" and not what you have postet in your first image
Here is a larger image of the steps and where it fails
mine lookes like this
especially this line seems me missing on your site: cd /var/www/html && PROJECT_ROOT=/var/www/html APP_URL=http://localhost ESLINT_DISABLE=true npm --prefix /var/www/html/vendor/shopware/storefront/Resources/app/storefront run hot
can you check your makefile pls?
should look like this: .PHONY: help .DEFAULT_GOAL := help
help: @grep -E '^[a-zA-Z_-]+:.?## .$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
watch-storefront: ## starts watcher for admin at http://localhost @echo "RequestHeader add hot-reload-mode "1"" > /var/www/html/.htaccess.watch cd /var/www/html && ./bin/build-storefront.sh cd /var/www/html && php bin/console theme:dump cd /var/www/html && PROJECT_ROOT=/var/www/html APP_URL=http://localhost ESLINT_DISABLE=true npm --prefix /var/www/html/vendor/shopware/storefront/Resources/app/storefront run hot
stop-watch-storefront: ## Reverts everything back to normal operation @rm -rf /var/www/html/.htaccess.watch
watch-admin: ## starts watcher for admin at http://localhost:8888 cd /var/www/html && ./bin/build-administration.sh cd /var/www/html && php bin/console bundle:dump cd /var/www/html && PROJECT_ROOT=/var/www/html APP_ENV=dev PORT=8888 HOST=0.0.0.0 ENV_FILE=/var/www/html/.env ESLINT_DISABLE=true npm run --prefix /var/www/html/vendor/shopware/administration/Resources/app/administration dev -- http://0.0.0.0
https://github.com/dockware/dockware/blob/master/template/assets/assets/shopware6/makefile.twig
ok i might was wrong, but im getting closer :-)
@martinweinmayr I recreated the docker instance but unfortunately I receive the same results. My makefile looks like this: (sorry about the bad contrast)
Any idea why this like is missing in my makefile?
Once I execute this line manually, it seems to work correctly 👍
Apart from the fonts that are not loaded proxied (9999)
i have now the same output as you, with the port 9998 and so on. But storefront works well. and i see changes emediatly.
We will investigate it a bit deeper on monday. To also get fonts working.
@martinweinmayr Awesome, thank you :)
ok found it ...
you have to manually call bin/console theme:compile that the default assets getting coppied to the assets folder...
We have the same issue sinsce last friday after we updated to 6.3.1.0. We tried to call the scripts manually as @hagmann mentioned, but didnt work.
We tried the bin/console theme:compile too, but alsno won't solve the issue.
For now we added 9998:9998 in our docker-compose file and open the frontend on that port. That seems the only working solution for now for us.
@LaurensGoedel do you also have windows?
today we will release all new versions of shopware for dockware and than normaly everything should work as normal ...
@martinweinmayr yes, win10 and we use Docker Desktop and WSL to run
That sounds good, looking forward for it!
so finally we fixed it!
solution: in your current setup just update the /var/www/html/.htaccess.watch and add the following line
RequestHeader add hot-reload-port 9999
if your fonts a re missing just
bin/console theme:compile
Later this day we will update all dockware images ✌️
My coworker just encountered the same issue, and your solution for the .htaccess.watch file solves the problem.
as we have now released 6.3.1.0 and 6.3.1.1 the watcher will work again ...
While running watch-storefront, the following error occurred:
The compilation was still successful, but the JS files are not being loaded using port 9999:
This may lead to this error:
The sources are available as expected on localhost:9999.
System details: Windows 10 Pro Docker Toolbox