From b633d46c731b4c7d4701ac258356321b660023ff Mon Sep 17 00:00:00 2001 From: "shopware-docs-updater[bot]" <313750211+shopware-docs-updater[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 11:40:29 +0000 Subject: [PATCH 1/2] docs: document local proxy and dump row limits from shopware-cli#1417 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- guides/development/dev-environment.md | 4 ++ .../tools/cli/project-commands/local-proxy.md | 52 +++++++++++++++++++ .../tools/cli/project-commands/mysql-dump.md | 22 ++++++++ 3 files changed, 78 insertions(+) create mode 100644 products/tools/cli/project-commands/local-proxy.md diff --git a/guides/development/dev-environment.md b/guides/development/dev-environment.md index 7ae217480..b23ade34b 100644 --- a/guides/development/dev-environment.md +++ b/guides/development/dev-environment.md @@ -290,6 +290,10 @@ environments: password: shopware ``` +## Local domains + +Instead of a fixed port, a project can be reached at a stable hostname like `https://my-shop.shopware.local` through a shared local proxy. Pass `--local-domain` to `shopware-cli project create`, or run `shopware-cli project proxy up` to opt an existing project in. See [Local Proxy](../../products/tools/cli/project-commands/local-proxy.md) for setup and details. + ## Ports The web container exposes these ports by default: diff --git a/products/tools/cli/project-commands/local-proxy.md b/products/tools/cli/project-commands/local-proxy.md new file mode 100644 index 000000000..77f5c770c --- /dev/null +++ b/products/tools/cli/project-commands/local-proxy.md @@ -0,0 +1,52 @@ +--- +nav: + title: Local Proxy + position: 15 + +--- + +# Local Proxy + +`shopware-cli project proxy` runs any number of local Shopware projects at the same time, each reachable at a stable hostname like `https://shop1.shopware.local`, instead of everyone competing for `127.0.0.1:8000`. + +## How it works + +- Every project gets a hostname derived from its directory name, for example `~/Playground/shop1` becomes `https://shop1.shopware.local`. +- A shared **Traefik** container routes requests by hostname, so shop containers publish no host ports. +- A small DNS container answers `*.shopware.local` with `127.0.0.1`. No query leaves the machine. +- A local certificate authority signs a wildcard certificate, so HTTPS works without browser warnings once trusted. + +## Opting in + +### New projects + +Pass `--local-domain` to `shopware-cli project create`, or choose **"Local domains: Yes"** in the interactive setup wizard. This writes the hostname into `.shopware-project.yml`, and `shopware-cli project dev` brings the shop up through the proxy automatically — no further `proxy up` needed. + +```bash +shopware-cli project create my-shop --docker --local-domain +``` + +### Existing (port-based) projects + +Use `proxy up` to opt an existing project in on demand. It switches the project's URL to its hostname and remembers the previous port so it can be restored later. + +```bash +shopware-cli project proxy up +``` + +## Commands + +| Command | Description | +| --- | --- | +| `shopware-cli project proxy setup` | One-time machine setup: configures DNS routing and trusts the local CA. Requires `sudo`. Supports `--domain` and `--skip-trust`. | +| `shopware-cli project proxy up` | Registers the current project with the shared proxy and starts it. | +| `shopware-cli project proxy down` | Deregisters the current project and restores its previous port-based configuration. | +| `shopware-cli project proxy list` | Lists all projects currently registered with the shared proxy. | +| `shopware-cli project proxy verify` | Runs a health check across DNS, certificate trust, and routing, with hints to fix problems. | +| `shopware-cli project proxy teardown` | Runs `down` for every registered project, then stops the shared infrastructure. Prompts for confirmation unless `--force` is passed. | + +Run `shopware-cli project proxy setup` once per machine before using local domains for the first time. After that, `project create --local-domain`, `project dev`, and `project proxy up` all work without `sudo`. + +## Requirements + +Local domains require the Docker-based development environment (`--docker`). They are not available with other environment executors. diff --git a/products/tools/cli/project-commands/mysql-dump.md b/products/tools/cli/project-commands/mysql-dump.md index 526bf897e..872b9f13e 100644 --- a/products/tools/cli/project-commands/mysql-dump.md +++ b/products/tools/cli/project-commands/mysql-dump.md @@ -109,3 +109,25 @@ dump: where: : 'id > 5' ``` + +## Limiting the number of rows + +Use the `--limit` flag to cap the number of rows exported for a table, for example to keep only the newest orders: + +```bash +shopware-cli project dump --limit order=100 +``` + +Tables referencing the limited table via foreign keys (including transitively) are filtered automatically, so they only contain rows belonging to the kept rows. A second limit on a table that is already filtered this way is rejected. When the limited table references itself (for example `product.parent_id`), the ancestors of the kept rows are exported too, so the dump stays importable. This requires the `CREATE` and `DROP` privileges, since the kept rows are frozen into staging tables. + +The same behavior can be configured persistently in `.shopware-project.yml`: + +```yaml +# .shopware-project.yml +dump: + limit: + : + rows: 100 + # Defaults to "created_at DESC" when the table has a created_at column + order_by: 'created_at DESC' +``` From fa81802a670cf9053726a7c3a3e49c138701e9d0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 21 Aug 2026 04:59:45 +0000 Subject: [PATCH 2/2] revert: remove local-proxy.md and revert dev-environment.md changes Co-authored-by: shyim <6224096+shyim@users.noreply.github.com> --- guides/development/dev-environment.md | 4 -- .../tools/cli/project-commands/local-proxy.md | 52 ------------------- 2 files changed, 56 deletions(-) delete mode 100644 products/tools/cli/project-commands/local-proxy.md diff --git a/guides/development/dev-environment.md b/guides/development/dev-environment.md index b23ade34b..7ae217480 100644 --- a/guides/development/dev-environment.md +++ b/guides/development/dev-environment.md @@ -290,10 +290,6 @@ environments: password: shopware ``` -## Local domains - -Instead of a fixed port, a project can be reached at a stable hostname like `https://my-shop.shopware.local` through a shared local proxy. Pass `--local-domain` to `shopware-cli project create`, or run `shopware-cli project proxy up` to opt an existing project in. See [Local Proxy](../../products/tools/cli/project-commands/local-proxy.md) for setup and details. - ## Ports The web container exposes these ports by default: diff --git a/products/tools/cli/project-commands/local-proxy.md b/products/tools/cli/project-commands/local-proxy.md deleted file mode 100644 index 77f5c770c..000000000 --- a/products/tools/cli/project-commands/local-proxy.md +++ /dev/null @@ -1,52 +0,0 @@ ---- -nav: - title: Local Proxy - position: 15 - ---- - -# Local Proxy - -`shopware-cli project proxy` runs any number of local Shopware projects at the same time, each reachable at a stable hostname like `https://shop1.shopware.local`, instead of everyone competing for `127.0.0.1:8000`. - -## How it works - -- Every project gets a hostname derived from its directory name, for example `~/Playground/shop1` becomes `https://shop1.shopware.local`. -- A shared **Traefik** container routes requests by hostname, so shop containers publish no host ports. -- A small DNS container answers `*.shopware.local` with `127.0.0.1`. No query leaves the machine. -- A local certificate authority signs a wildcard certificate, so HTTPS works without browser warnings once trusted. - -## Opting in - -### New projects - -Pass `--local-domain` to `shopware-cli project create`, or choose **"Local domains: Yes"** in the interactive setup wizard. This writes the hostname into `.shopware-project.yml`, and `shopware-cli project dev` brings the shop up through the proxy automatically — no further `proxy up` needed. - -```bash -shopware-cli project create my-shop --docker --local-domain -``` - -### Existing (port-based) projects - -Use `proxy up` to opt an existing project in on demand. It switches the project's URL to its hostname and remembers the previous port so it can be restored later. - -```bash -shopware-cli project proxy up -``` - -## Commands - -| Command | Description | -| --- | --- | -| `shopware-cli project proxy setup` | One-time machine setup: configures DNS routing and trusts the local CA. Requires `sudo`. Supports `--domain` and `--skip-trust`. | -| `shopware-cli project proxy up` | Registers the current project with the shared proxy and starts it. | -| `shopware-cli project proxy down` | Deregisters the current project and restores its previous port-based configuration. | -| `shopware-cli project proxy list` | Lists all projects currently registered with the shared proxy. | -| `shopware-cli project proxy verify` | Runs a health check across DNS, certificate trust, and routing, with hints to fix problems. | -| `shopware-cli project proxy teardown` | Runs `down` for every registered project, then stops the shared infrastructure. Prompts for confirmation unless `--force` is passed. | - -Run `shopware-cli project proxy setup` once per machine before using local domains for the first time. After that, `project create --local-domain`, `project dev`, and `project proxy up` all work without `sudo`. - -## Requirements - -Local domains require the Docker-based development environment (`--docker`). They are not available with other environment executors.