Skip to content

Commit 4e6272a

Browse files
Add Deployment Helper page edits
1 parent ddd468c commit 4e6272a

3 files changed

Lines changed: 291 additions & 139 deletions

File tree

guides/hosting/installation-updates/deployments/build-w-o-db.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
nav:
33
title: Building Without Database
4-
position: 20
4+
position: 25
55

66
---
77

8-
# Building Assets of Administration and Storefront without a Database
8+
# Building Administration and Storefront Assets Without a Database
99

1010
It is common to prebuild assets in professional deployments to deploy the build artifact assets to the production environment. This task is mostly done by a CI job that doesn't have access to the production database. Shopware needs access to the database to look up the installed extensions/load the configured theme variables. To be able to build the assets without a database, we can use static dumped files. All extensions need to be required by Composer to be able to be loaded by the `ComposerPluginLoader`.
1111

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
nav:
3+
title: Deployment Helper Troubleshooting
4+
position: 20
5+
6+
---
7+
8+
# Deployment Helper Troubleshooting
9+
10+
This page highlights common failures when running `shopware-deployment-helper run`, and provides guidance for resolving them. For the full command, configuration, and environment-variable reference, see [Deployment Helper](deployment-helper.md).
11+
12+
## Getting more detail
13+
14+
`run` returns a non-zero exit code on failure and prints each step's output. Read the output above the failure to find the failing command, and re-run that Shopware console command directly (for example, `bin/console system:update:finish`) to see its full error.
15+
16+
## The deploy fails to reach the database
17+
18+
**Symptom:** the run ends with a database connection error, or `Could not connect to database`.
19+
20+
The helper waits for the database, retrying up to 10 times with a one-second pause between attempts. If it still cannot connect, it fails.
21+
22+
Check if:
23+
24+
- `DATABASE_URL` is correct and reachable from the deploy environment (host, port, credentials).
25+
- the database service is actually up before the helper runs. In container setups, order startup so the database is ready, or add your own wait.
26+
- TLS is required, and `DATABASE_SSL_CA` / `DATABASE_SSL_CERT` / `DATABASE_SSL_KEY` are set. To bypass server-certificate verification (non-production only), set `DATABASE_SSL_DONT_VERIFY_SERVER_CERT`. See [Environment variables](deployment-helper.md#environment-variables).
27+
28+
## A step times out on a large shop
29+
30+
**Symptom:** a step is killed after 300 seconds.
31+
32+
Each step has a timeout (default 300s). Raise or disable it:
33+
34+
```bash
35+
vendor/bin/shopware-deployment-helper run --timeout=900
36+
# or disable entirely:
37+
vendor/bin/shopware-deployment-helper run --timeout=null
38+
```
39+
40+
You can also set `SHOPWARE_DEPLOYMENT_TIMEOUT` in the environment. The `--timeout` option takes precedence.
41+
42+
## Theme or asset steps are slow or redundant in CI/CD
43+
44+
If your CI build already compiled the theme and installed assets (via `shopware-cli project ci`), skip those steps at deploy time:
45+
46+
```bash
47+
vendor/bin/shopware-deployment-helper run --skip-theme-compile --skip-assets-install
48+
```
49+
50+
Only skip them if the build genuinely produced them. Otherwise, the storefront will be missing compiled assets.
51+
52+
## An update ran, but `system:update:finish` did not
53+
54+
This is expected. The update-finish/migration step runs only when the Shopware version actually changed. If you redeploy the same version, that step is skipped by design. To force it, deploy an actual version change.
55+
56+
## A one-time task keeps running every deploy
57+
58+
A one-time task is only recorded as done after it succeeds. If it keeps running, it is failing partway through. Check the deploy output for its error:
59+
60+
- Inspect state: `one-time-task:list`.
61+
- If the task's effect is already applied and you want to stop it: `one-time-task:mark <id>`.
62+
- To force a rerun: `one-time-task:unmark <id>`.
63+
64+
## A config setting seems to have no effect
65+
66+
Unrecognized keys in `.shopware-project.yml` are ignored silently. Check:
67+
68+
- The key is spelled correctly and nested under `deployment:`.
69+
- You are editing the file the helper actually loads. If `SHOPWARE_PROJECT_CONFIG_FILE` or `--project-config` is set, that file wins over the auto-discovered one.
70+
- A `.shopware-project.local.yml` isn't overriding your value (local files merge on top of the base). See [Local configuration overrides](deployment-helper.md#local-configuration-overrides).
71+
72+
## Extensions aren't being installed or updated as expected
73+
74+
- Confirm `deployment.extension-management.enabled` is `true`.
75+
- Check the extension isn't listed under `exclude`, or set to `state: ignore` / `inactive` in `overrides`.
76+
- If extensions are managed by the Store or Administration instead, extension management may be intentionally disabled — reconcile the two so they don't fight. Prefer managing extensions from code (via Composer) or via the helper, not both. See [Extension management and Store-installed plugins](deployment-helper.md#extension-management-and-store-installed-plugins).
77+
78+
## Store login or license refresh fails
79+
80+
App installation and license refresh need valid Store credentials and a license domain. Verify:
81+
82+
- `SHOPWARE_STORE_ACCOUNT_EMAIL` and `SHOPWARE_STORE_ACCOUNT_PASSWORD` (or `SHOPWARE_STORE_SHOP_SECRET`) are set.
83+
- A license domain is set, via `deployment.store.license-domain` or `SHOPWARE_STORE_LICENSE_DOMAIN`.
84+
85+
## Fastly snippets aren't updating
86+
87+
Automatic snippet deployment during `run` only happens when:
88+
89+
- A `config/fastly` directory exists in the project, and
90+
- `FASTLY_API_TOKEN` and `FASTLY_SERVICE_ID` are set, and
91+
- `FASTLY_DISABLE_SNIPPET_UPDATE` is **not** set to `1`.
92+
93+
To manage snippets manually, use the `fastly:snippet:*` commands (see [Fastly integration](deployment-helper.md#fastly-integration)).
94+
95+
## Need to completely reinstall
96+
97+
If an environment is broken beyond repair, force a clean install from scratch.
98+
99+
:::warning
100+
Setting `SHOPWARE_DEPLOYMENT_FORCE_REINSTALL=1` triggers a fresh install with `--drop-database`. This destroys existing data! Only use it on disposable environments, never on production.
101+
:::

0 commit comments

Comments
 (0)