Skip to content

[Encore] Add version support for the --public parameter and a small docker support section #16622

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

Closed
wants to merge 6 commits into from
Closed
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions frontend/encore/virtual-machine.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ If your Symfony application is running on a custom domain (e.g.
}
}

.. versionadded:: 1.9.0

The ``--public`` option was added in Encore 1.9.0

After restarting Encore and reloading your web page, you will probably see
different issues in the web console:

Expand Down Expand Up @@ -92,6 +96,29 @@ connections:
Make sure to run the development server inside your virtual machine only;
otherwise other computers can have access to it.

Docker support
~~~~~~~~~~~~~~

If you are using ``docker``, to set up a ``nodejs`` ``docker-compose`` setup
that works with the ``localhost:8080`` domain, add this to your
``docker-compose-yml`` file:

.. code-block:: yaml

services:
nodejs:
image: node:16
working_dir: /var/www
ports:
- '8080:8080'
volumes:
- ./:/var/www:rw,cached
- ~/.symfony/certs/default.p12:/root/.symfony/certs/default.p12
command: bash -c "yarn && yarn run dev-server --public https://localhost:8080 --host 0.0.0.0 --https"

You may need to load the ``https://localhost:8080`` url once with your browser
and accept the security exception before our assets can be loaded correctly.

Fix "Invalid Host header" Issue
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down