Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add instructions for using local assets in Docker

Michał Jelonek48d63d4ff743
diff --git a/docs/customization/docker.rst b/docs/customization/docker.rst
index 7c91b0eaca..5a3d3eba77 100644
--- a/docs/customization/docker.rst
+++ b/docs/customization/docker.rst
@@ -21,6 +21,19 @@ You will need to install `Docker <https://docs.docker.com/install/>`_ and `docke
Our configuration uses `docker-compose.override.yml <https://docs.docker.com/compose/extends/#understanding-multiple-compose-files>`_ that exposes Saleor, PostgreSQL and Redis ports and runs Saleor via ``python manage.py runserver`` for local development. If you do not wish to use any overrides then you can tell compose to only use `docker-compose.yml` configuration using `-f`, like so `docker-compose -f docker-compose.yml up`.
+Using local assets
+------------------
+
+By default we do not mount assets for development in the Docker, reason being is those are built in the Docker at build-time
+and aren't present in the cloned repository, so what was built on the Docker would be overshadowed by empty directories from the host.
+
+However, we do know that there might be a case that you wish to mount them and see your changes reflected in the container, thus before proceeding you need to modify `docker-compose.override.yml`.
+
+In order for Docker to use your assets from the host, you need to remove ``/app/saleor/static/assets`` volume and add ``./webpack-bundle.json:/app/webpack-bundle.json`` volume.
+
+Additionally if you wish to have the compiled templated emails mounted then you need to also remove ``/app/templates/templated_email/compiled`` volume from web and celery services.
+
+
Usage
-----