You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each Deployment looks different but some things are equals between multiple ways to deploy. This site list some best practises todo.
10
+
11
+
## Plugins
12
+
13
+
All Plugins should be managed by Composer. If you have project specific plugins you should put them into `custom/static-plugins` and require the plugin then or build them into the `src` directory without building a Plugin. You can refer also to [this Blog Post](https://shyim.me/blog/you-dont-need-a-plugin-to-customize-shopware-6/) if you want to customize Shopware without Plugins.
14
+
15
+
## DB-less building
16
+
17
+
When all plugins are installed with Composer, you can use `bin/ci` instead of `bin/console`.
18
+
This command does not use the Database for basic commands like `bundle:dump` which are required to build the Storefront / Administration assets. So in this way you can build all assets of your project once.
19
+
20
+
## Building assets
21
+
22
+
When you are building the Assets make sure to set the following environment variables:
23
+
24
+
```
25
+
NODE_ENV=production
26
+
# Disable Puppeteer Downloading
27
+
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
28
+
# Disable Typescript Checking
29
+
DISABLE_ADMIN_COMPILATION_TYPECHECK=true
30
+
# Build only the extensions not the Administration
31
+
SHOPWARE_ADMIN_BUILD_ONLY_EXTENSIONS=1
32
+
```
33
+
34
+
## Composer
35
+
36
+
There also some flags that are recommanded when you are using Composer:
37
+
38
+
*`--no-dev` - Don't install dev dependencies (Profiler, use APP_DEBUG=1 in prod / stage debugging)
39
+
*`--classmap-authoritative` - Generate only the class map. Disables on-the-fly finding classes.
40
+
41
+
{{< hint info >}}
42
+
Enabling classmap-authoritative with normal plugins installed (custom/plugins) will introduce a lot of performance issues and with Shopware 6.5 this will be disabled on the fly. Only use this option when all plugins are installed with Composer.
43
+
{{< /hint >}}
44
+
45
+
Also make sure that you set the correct PHP version inside the `composer.json` to fetch the dependencies for the right PHP version (without using the excact same version inside your CI).
46
+
47
+
```json
48
+
{
49
+
"config": {
50
+
"platform": {
51
+
"php": "8.1.8"
52
+
}
53
+
},
54
+
"require": {
55
+
...
56
+
}
57
+
}
58
+
```
59
+
60
+
## Splitting Tasks
61
+
62
+
The most intensive tasks like building assets, installing composer packages should be done in the CI. And this artifact/image should be transfered to the production server.
63
+
64
+
From there you can update all plugins by `bin/console plugin:refresh` and `bin/console plugin:update ""` on the server. And maybe build the theme `bin/console theme:compile`.
0 commit comments