-
-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Webpack Dev Server with Devilbox #782
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still having issues. I need to make an exception in Firefox everytime I switch projects, by right clicking a resource in the F12 developer tools and opening one in a new tab. I would really appreciate any help. |
Hi @ptmrio you can find the reverse proxy setup within the documentation. It is pretty mich the same as this: https://devilbox.readthedocs.io/en/latest/examples/setup-reverse-proxy-nodejs.html |
Thank you @cytopia. I was pretty much on that path, but I couldn't get it to work. Could you help my with the logic behind this setup? I'd guess, that I have to
Thanks. And keep your great work up and running. IMHO this is the greatest project for web development there is. The modern WAMP of its time, but a thousand times better! Edit: Just to be clear, it works partly for me with the following settings: apache24.yml:
webpack.config.js
Added to Startet with: (Using Symfony webpack encore) The only thing that does not work, is hot reloading.
I would guess, this is because the vhost doesn't listen to port 4000, only to 80 and 443. While config.output.publicPath changes the path for all files, the websocket path still tries port 4000, which is not listed to. Any suggestion? |
With Docker, you could map port 4000 to also go to 443, but you would need someway to identify traffic that is a websocket so that the upgrade header gets sent, and is forwarded to the webpack port instead of php-fpm. perhaps that /ws folder could be used in the virtualhost? |
Thanks @science695. I guess you'll have to make Docker + Apache/Nginx make listening to port 4000 and then edit the vhost accordingly for the reverse proxy. Unfortunately I'm not docker savvy enough to get it to work. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Still not resolved for me. Can't get the websocket to work, it always runs on a different host or port. Still looking for help. |
@ptmrio any solution? Could you share a repository with what you have investigated? Thank you |
Nope, no "solution". Latest status is: #782 (comment) I'm using |
@ptmrio Currently working in automated reverse proxies for such use-cases. Should be available shortly |
@cytopia thanks lot, looking forward |
This is a websocket over SSL. You can now set this easily via a If the project providing the websocket server is # SSL Websocket Reverse Proxy backend
conf:rproxy:wss:php:4000
Then
For everything above to work, you will need to switch to the Side noteFor troubleshooting I would first create a normal websocket server (without SSL) and tell the backend configuration to use conf:rproxy:ws:php:4000 Once this is working, you can move on with SSL |
Thanks a lot, will try asap next year :) |
ISSUE TYPE
SUMMARY
As webpack-dev-server gets more popular and is also a big part of Symfony's webpack encore, I would kindly ask for a proper documentation of a correct setup.
Currently I need to add the following:
docker-compose.override.yml
webpack.config.js
and also the starting command needs to be:
encore dev-server --https --host 0.0.0.0
package.json
Problems with this setup:
https: { ... }
options object does not workhost
needs to be included in the yarn command to start the server, else it tries to use localhostclient.host
needs to be specified somewhat redundantly to make the web socket workingWebpack Encore 1.0.4
Webpack 5.20.1
Webpack-dev-server: 4.0.0-beta.0
Devilbox 1.7.1
Also see: symfony/webpack-encore#828
Goal
Add a documentation guide for proper implementation of webpack-dev-server.
webpack-dev-server
(wds)? (startingwds
in multiple projects simultaneously leads to problemsWould highly appreciate! Thank you for the great devilbox!
The text was updated successfully, but these errors were encountered: