├── public ├── js │ └── .gitkeep ├── bundles │ └── .gitkeep ├── css │ └── .gitkeep ├── fonts │ └── .gitkeep ├── media │ └── .gitkeep ├── sitemap │ └── .gitkeep ├── theme │ └── .gitkeep ├── thumbnail │ └── .gitkeep ├── favicon.ico ├── .htaccess.dist ├── index.php └── maintenance.html ├── custom ├── plugins │ └── .gitkeep └── static-plugins │ └── .gitkeep ├── bin ├── .gitignore ├── build-js.sh ├── entrypoint.sh ├── .htaccess ├── watch-administration.sh ├── watch-storefront.sh ├── build.sh ├── build-administration.sh ├── build-storefront.sh ├── deleted_files_vendor.sh ├── ci ├── console └── package.sh ├── config ├── packages │ ├── .gitkeep │ ├── shopware.yaml │ ├── enqueue.yaml │ ├── fastly.yaml.dist │ ├── cache.yaml │ ├── storefront.yaml │ ├── framework.yaml │ └── monolog.yaml ├── jwt │ └── .gitignore ├── secrets │ └── .gitignore ├── fastly │ ├── hash.vcl │ ├── deliver.vcl │ ├── hit.vcl │ └── recv.vcl ├── .htaccess ├── services_test.xml ├── services │ ├── defaults_test.xml │ └── defaults.xml ├── services.xml ├── bundles.php └── README.md ├── files └── theme-config │ ├── index.json │ ├── 6753315de5ae4e9081228ff9d6e7b802.json │ └── b62af93ffceb42dfa9a73d0973ee102c.json ├── src ├── HttpKernel.php ├── .htaccess ├── Kernel.php └── TestBootstrap.php ├── .github └── ISSUE_TEMPLATE │ ├── config.yml │ ├── feature_request.yml │ └── bug_report.yml ├── .platform ├── routes.yaml └── services.yaml ├── .htaccess ├── .editorconfig ├── .gitignore ├── license.txt ├── .env.dist ├── install-redis.sh ├── setup-fastly.sh ├── composer.json ├── platformsh-env.php ├── README.md └── .platform.app.yaml /public/js/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom/plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/bundles/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/css/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/fonts/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/media/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/sitemap/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/theme/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /bin/.gitignore: -------------------------------------------------------------------------------- 1 | splitsh-lite -------------------------------------------------------------------------------- /config/packages/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /public/thumbnail/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /custom/static-plugins/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/jwt/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | 3 | !.gitignore -------------------------------------------------------------------------------- /config/secrets/.gitignore: -------------------------------------------------------------------------------- 1 | * 2 | 3 | !.gitignore -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/vvuksan/paas/main/public/favicon.ico -------------------------------------------------------------------------------- /files/theme-config/index.json: -------------------------------------------------------------------------------- 1 | {"a3b6618b39d549fc87c97fb2422d085f":"6753315de5ae4e9081228ff9d6e7b802"} -------------------------------------------------------------------------------- /config/packages/shopware.yaml: -------------------------------------------------------------------------------- 1 | shopware: 2 | admin_worker: 3 | enable_admin_worker: false 4 | auto_update: 5 | enabled: false 6 | -------------------------------------------------------------------------------- /config/packages/enqueue.yaml: -------------------------------------------------------------------------------- 1 | # enqueue: 2 | # rabbitmq: 3 | # transport: 4 | # dsn: "%env(string:RABBITMQ_URL)%" 5 | # client: ~ 6 | -------------------------------------------------------------------------------- /bin/build-js.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | BIN_DIR="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 4 | 5 | set -e 6 | 7 | "${BIN_DIR}/build-administration.sh" 8 | "${BIN_DIR}/build-storefront.sh" 9 | -------------------------------------------------------------------------------- /src/HttpKernel.php: -------------------------------------------------------------------------------- 1 | 2 | # Deny all requests from Apache 2.4+. 3 | 4 | Require all denied 5 | 6 | 7 | # Deny all requests from Apache 2.0-2.2. 8 | 9 | Deny from all 10 | 11 | 12 | -------------------------------------------------------------------------------- /config/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | # Deny all requests from Apache 2.4+. 3 | 4 | Require all denied 5 | 6 | 7 | # Deny all requests from Apache 2.0-2.2. 8 | 9 | Deny from all 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/.htaccess: -------------------------------------------------------------------------------- 1 | 2 | # Deny all requests from Apache 2.4+. 3 | 4 | Require all denied 5 | 6 | 7 | # Deny all requests from Apache 2.0-2.2. 8 | 9 | Deny from all 10 | 11 | 12 | -------------------------------------------------------------------------------- /config/packages/cache.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | cache: 3 | app: cache.adapter.redis 4 | system: cache.adapter.redis 5 | default_redis_provider: "redis://%env(string:default:default_redis_host:REDIS_HOST)%:%env(int:default:default_redis_port:REDIS_PORT)%/%env(int:default:default_redis_database:REDIS_CACHE_DATABASE)%" 6 | -------------------------------------------------------------------------------- /.platform/routes.yaml: -------------------------------------------------------------------------------- 1 | # The routes of the project. 2 | # 3 | # Each route describes how an incoming URL is going 4 | # to be processed by Platform.sh. 5 | 6 | "https://{default}/": 7 | type: upstream 8 | id: shopware 9 | upstream: "app:http" 10 | cache: 11 | enabled: true 12 | cookies: ['/^ss?ess/'] 13 | -------------------------------------------------------------------------------- /config/packages/storefront.yaml: -------------------------------------------------------------------------------- 1 | storefront: 2 | # Enable Ajax Mode for Fastly support 3 | # csrf: 4 | # mode: ajax 5 | theme: 6 | config_loader_id: Shopware\Storefront\Theme\ConfigLoader\StaticFileConfigLoader 7 | available_theme_provider: Shopware\Storefront\Theme\ConfigLoader\StaticFileAvailableThemeProvider 8 | -------------------------------------------------------------------------------- /.platform/services.yaml: -------------------------------------------------------------------------------- 1 | db: 2 | type: mariadb:10.5 3 | disk: 2048 4 | 5 | cacheredis: 6 | type: redis:6.0 7 | 8 | # uncomment if you want to use elasticsearch 9 | # searchelastic: 10 | # type: elasticsearch:7.9 11 | # disk: 256 12 | 13 | # uncomment if you want to use rabbitmq 14 | # queuerabbit: 15 | # type: rabbitmq:3.8 16 | # disk: 1024 17 | -------------------------------------------------------------------------------- /config/fastly/deliver.vcl: -------------------------------------------------------------------------------- 1 | # Remove the exact PHP Version from the response for more security (e.g. 404 pages) 2 | unset resp.http.x-powered-by; 3 | 4 | if (resp.http.sw-invalidation-states) { 5 | # invalidation headers are only for internal use 6 | unset resp.http.sw-invalidation-states; 7 | 8 | ## we don't want the client to cache 9 | set resp.http.Cache-Control = "max-age=0, private"; 10 | } 11 | -------------------------------------------------------------------------------- /config/fastly/hit.vcl: -------------------------------------------------------------------------------- 1 | if (req.http.cookie ~ "sw-states=") { 2 | set req.http.states = regsub(req.http.cookie, "^.*?sw-states=([^;]*);*.*$", "\1"); 3 | 4 | if (req.http.states ~ "logged-in" && obj.http.sw-invalidation-states ~ "logged-in" ) { 5 | return (pass); 6 | } 7 | 8 | if (req.http.states ~ "cart-filled" && obj.http.sw-invalidation-states ~ "cart-filled" ) { 9 | return (pass); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.htaccess: -------------------------------------------------------------------------------- 1 | DirectoryIndex index.html index.php 2 | 3 | 4 | Options -MultiViews 5 | 6 | 7 | 8 | # Restrict access to VCS directories 9 | RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$) 10 | 11 | # Restrict access to root folder files 12 | RedirectMatch 404 /(composer\.(json|lock|phar)|README\.md|\.gitignore|.*\.dist|\.env.*)$ 13 | 14 | 15 | -------------------------------------------------------------------------------- /config/services_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # Shopware development editor configuration normalization 2 | # http://editorconfig.org/ 3 | 4 | # This is the top-most .editorconfig file; do not search in parent directories. 5 | root = true 6 | 7 | # All files. 8 | [*] 9 | end_of_line = lf 10 | indent_style = space 11 | indent_size = 4 12 | charset = utf-8 13 | trim_trailing_whitespace = true 14 | insert_final_newline = true 15 | 16 | [*.md] 17 | trim_trailing_whitespace = false 18 | -------------------------------------------------------------------------------- /config/packages/framework.yaml: -------------------------------------------------------------------------------- 1 | framework: 2 | session: 3 | handler_id: Symfony\Component\HttpFoundation\Session\Storage\Handler\RedisSessionHandler 4 | cache: 5 | app: cache.adapter.redis 6 | default_redis_provider: "redis://%env(string:default:default_redis_host:REDIS_HOST)%:%env(int:default:default_redis_port:REDIS_PORT)%/%env(int:default:default_redis_database:REDIS_CACHE_DATABASE)%" 7 | 8 | monolog: 9 | handlers: 10 | business_event_handler_buffer: 11 | level: error -------------------------------------------------------------------------------- /bin/watch-administration.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 4 | 5 | export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}" 6 | export ENV_FILE=${ENV_FILE:-"${PROJECT_ROOT}/.env"} 7 | 8 | source "${ENV_FILE}" 9 | export HOST=${HOST:-"localhost"} 10 | export ESLINT_DISABLE 11 | export PORT 12 | export APP_URL 13 | 14 | bin/console feature:dump || true 15 | 16 | npm run --prefix vendor/shopware/administration/Resources/app/administration/ dev 17 | -------------------------------------------------------------------------------- /bin/watch-storefront.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 4 | 5 | export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}" 6 | export ENV_FILE=${ENV_FILE:-"${PROJECT_ROOT}/.env"} 7 | 8 | source "${ENV_FILE}" 9 | export APP_URL 10 | export STOREFRONT_PROXY_PORT 11 | export ESLINT_DISABLE 12 | 13 | "${CWD}"/console theme:compile 14 | "${CWD}"/console theme:dump 15 | npm --prefix vendor/shopware/storefront/Resources/app/storefront/ run-script hot-proxy 16 | -------------------------------------------------------------------------------- /bin/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | set -x 5 | 6 | BIN_DIR="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 7 | export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$BIN_DIR")"}" 8 | 9 | composer install -d "${PROJECT_ROOT}" --no-interaction --optimize-autoloader --no-suggest 10 | 11 | if [[ -e "${PROJECT_ROOT}/vendor/shopware/recovery" ]]; then 12 | composer install -d "${PROJECT_ROOT}"/vendor/shopware/recovery --no-interaction --optimize-autoloader --no-suggest 13 | fi 14 | 15 | "${BIN_DIR}/build-js.sh" 16 | 17 | set +x 18 | -------------------------------------------------------------------------------- /config/services/defaults_test.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | %kernel.project_dir%/var/test/jwt/private.pem 9 | %env(string:default:jwt_private_key_passphrase_default:JWT_PRIVATE_KEY_PASSPHRASE)% 10 | 11 | 12 | 13 | %kernel.project_dir%/var/test/jwt/public.pem 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | custom/* 2 | !custom/plugins/.gitkeep 3 | !custom/static-plugins/ 4 | 5 | /vendor/ 6 | /bin/vendor/ 7 | 8 | /.idea 9 | /docker-compose.override.yml 10 | 11 | /config/packages/local.yaml 12 | /config/packages/local.yml 13 | 14 | /public/recovery 15 | /public/fonts/* 16 | !/public/fonts/.gitkeep 17 | /public/img/* 18 | !/public/img/.gitkeep 19 | /public/css/* 20 | !/public/css/.gitkeep 21 | /public/js/* 22 | !/public/js/.gitkeep 23 | /public/media/* 24 | !/public/media/.gitkeep 25 | /public/theme/* 26 | !/public/theme/.gitkeep 27 | /public/thumbnail/* 28 | !/public/thumbnail/.gitkeep 29 | /public/plugins/* 30 | /public/assets/* 31 | /public/sitemap/* 32 | !/public/sitemap/.gitkeep 33 | /public/bundles/* 34 | !/public/bundles/.gitkeep 35 | 36 | /files/* 37 | !/files/theme-config 38 | 39 | /platform/ 40 | /repos/ 41 | 42 | .env 43 | 44 | .cache/ 45 | 46 | .envrc 47 | 48 | /var/* 49 | !/var/log/.gitkeep 50 | !/var/cache/.gitkeep 51 | !/var/queue/.gitkeep 52 | !/var/test/.gitkeep 53 | -------------------------------------------------------------------------------- /license.txt: -------------------------------------------------------------------------------- 1 | Copyright 2019 shopware AG 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated 4 | documentation files (the "Software"), to deal in the Software without restriction, including without limitation the 5 | rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit 6 | persons to whom the Software is furnished to do so, subject to the following conditions: 7 | 8 | The above copyright notice and this permission notice shall be included in all 9 | copies or substantial portions of the Software. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO 12 | THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 13 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 14 | TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /config/services.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | session_ 14 | 15 | 16 | 17 | 18 | 19 | %env(string:default:default_redis_host:REDIS_HOST)% 20 | %env(int:default:default_redis_port:REDIS_PORT)% 21 | 22 | 23 | %env(int:default:default_redis_database:REDIS_SESSION_DATABASE)% 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.yml: -------------------------------------------------------------------------------- 1 | name: Bug report 🐛 2 | description: Existing feature does not behave as expected. 3 | labels: [Bug] 4 | body: 5 | - type: markdown 6 | attributes: 7 | value: | 8 | Thanks for taking the time to fill out this bug report! 9 | - type: input 10 | id: php-version 11 | attributes: 12 | label: PHP Version 13 | validations: 14 | required: true 15 | - type: input 16 | id: shopware-version 17 | attributes: 18 | label: Shopware Version 19 | validations: 20 | required: true 21 | - type: textarea 22 | id: expected-behaviour 23 | attributes: 24 | label: Expected behaviour 25 | description: What did you expect to happen? 26 | validations: 27 | required: true 28 | - type: textarea 29 | id: actual-behaviour 30 | attributes: 31 | label: Actual behaviour 32 | description: Please describe the issue 33 | validations: 34 | required: true 35 | - type: textarea 36 | id: steps-to-reproduce 37 | attributes: 38 | label: How to reproduce 39 | description: Tell us how the bug can be reproduced 40 | validations: 41 | required: true 42 | -------------------------------------------------------------------------------- /config/bundles.php: -------------------------------------------------------------------------------- 1 | ['all' => true], 5 | Symfony\Bundle\MonologBundle\MonologBundle::class => ['all' => true], 6 | Sensio\Bundle\FrameworkExtraBundle\SensioFrameworkExtraBundle::class => ['all' => true], 7 | Symfony\Bundle\TwigBundle\TwigBundle::class => ['all' => true], 8 | Symfony\Bundle\WebProfilerBundle\WebProfilerBundle::class => ['dev' => true, 'test' => true], 9 | Symfony\Bundle\DebugBundle\DebugBundle::class => ['dev' => true, 'test' => true], 10 | Enqueue\Bundle\EnqueueBundle::class => ['all' => true], 11 | Enqueue\MessengerAdapter\Bundle\EnqueueAdapterBundle::class => ['all' => true], 12 | Shopware\Core\Framework\Framework::class => ['all' => true], 13 | Shopware\Core\System\System::class => ['all' => true], 14 | Shopware\Core\Content\Content::class => ['all' => true], 15 | Shopware\Core\Checkout\Checkout::class => ['all' => true], 16 | Shopware\Core\Profiling\Profiling::class => ['dev' => true], 17 | Shopware\Administration\Administration::class => ['all' => true], 18 | Shopware\Storefront\Storefront::class => ['all' => true], 19 | Shopware\Elasticsearch\Elasticsearch::class => ['all' => true], 20 | ]; 21 | 22 | if (\class_exists('Shopware\Core\Maintenance\Maintenance')) { 23 | $bundles[Shopware\Core\Maintenance\Maintenance::class] = ['all' => true]; 24 | } 25 | 26 | return $bundles; 27 | -------------------------------------------------------------------------------- /public/.htaccess.dist: -------------------------------------------------------------------------------- 1 | # BEGIN Shopware 2 | # The directives (lines) between "# BEGIN Shopware" and "# END Shopware" are dynamically generated. Any changes to the directives between these markers will be overwritten. 3 | 4 | DirectoryIndex index.php 5 | 6 | 7 | Options -MultiViews 8 | 9 | 10 | 11 | RewriteEngine On 12 | 13 | RewriteCond %{REQUEST_URI}::$1 ^(/.+)/(.*)::\2$ 14 | RewriteRule ^(.*) - [E=BASE:%1] 15 | 16 | # Sets the HTTP_AUTHORIZATION header removed by Apache 17 | RewriteCond %{HTTP:Authorization} . 18 | RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] 19 | 20 | RewriteCond %{ENV:REDIRECT_STATUS} ^$ 21 | RewriteRule ^index\.php(?:/(.*)|$) %{ENV:BASE}/$1 [R=301,L] 22 | 23 | # If the requested filename exists, simply serve it. 24 | # We only want to let Apache serve files and not directories. 25 | RewriteCond %{REQUEST_FILENAME} -f 26 | RewriteRule ^ - [L] 27 | 28 | # Rewrite all other queries to the front controller. 29 | RewriteRule ^ %{ENV:BASE}/index.php [L] 30 | 31 | 32 | 33 | 34 | RedirectMatch 302 ^/$ /index.php/ 35 | 36 | 37 | 38 | 39 | 40 | Header set Content-Security-Policy "script-src 'none'" 41 | 42 | 43 | 44 | # END Shopware 45 | -------------------------------------------------------------------------------- /.env.dist: -------------------------------------------------------------------------------- 1 | # This file is a "template" of which env vars need to be defined for your application 2 | # Copy this file to .env file for development, create environment variables when deploying to production 3 | # https://symfony.com/doc/current/best_practices/configuration.html#infrastructure-related-configuration 4 | 5 | ###> symfony/framework-bundle ### 6 | APP_ENV=__APP_ENV__ 7 | APP_SECRET=8583a6ff63c5894a3195331701749943 8 | APP_URL=__APP_URL__ 9 | #TRUSTED_PROXIES=127.0.0.1,127.0.0.2 10 | #TRUSTED_HOSTS=localhost,example.com 11 | ###< symfony/framework-bundle ### 12 | 13 | ###> symfony/swiftmailer-bundle ### 14 | # For Gmail as a transport, use: "gmail://username:password@localhost" 15 | # For a generic SMTP server, use: "smtp://localhost:25?encryption=&auth_mode=" 16 | # Delivery is disabled by default via "null://localhost" 17 | MAILER_URL=__APP_MAILER_URL__ 18 | ###< symfony/swiftmailer-bundle ### 19 | 20 | INSTANCE_ID= 21 | 22 | DATABASE_URL=mysql://__DB_USER__:__DB_PASSWORD__@__DB_HOST__:__DB_PORT__/__DB_NAME__ 23 | 24 | COMPOSER_HOME=__COMPOSER_HOME__ 25 | 26 | BLUE_GREEN_DEPLOYMENT=1 27 | 28 | SHOPWARE_ES_HOSTS=__SHOPWARE_ES_HOSTS__ 29 | SHOPWARE_ES_ENABLED=__SHOPWARE_ES_ENABLED__ 30 | SHOPWARE_ES_INDEXING_ENABLED=__SHOPWARE_ES_INDEXING_ENABLED__ 31 | SHOPWARE_ES_INDEX_PREFIX=__SHOPWARE_ES_INDEX_PREFIX__ 32 | SHOPWARE_HTTP_CACHE_ENABLED=__SHOPWARE_HTTP_CACHE_ENABLED__ 33 | SHOPWARE_HTTP_DEFAULT_TTL=__SHOPWARE_HTTP_DEFAULT_TTL__ 34 | 35 | STOREFRONT_PROXY_URL=__STOREFRONT_PROXY_URL__ 36 | 37 | __FEATURES__ 38 | -------------------------------------------------------------------------------- /src/Kernel.php: -------------------------------------------------------------------------------- 1 | getEnvironment() === 'dev') { 38 | self::getConnection()->getConfiguration()->setSQLLogger(new DebugStack()); 39 | } 40 | 41 | $reflection = new \ReflectionMethod(\Shopware\Core\Kernel::class, 'initializeDatabaseConnectionVariables'); 42 | if (!$reflection->isPrivate()) { 43 | parent::initializeDatabaseConnectionVariables(); 44 | } 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /bin/build-administration.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 4 | 5 | set -e 6 | 7 | export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}" 8 | ADMIN_ROOT="${ADMIN_ROOT:-"${PROJECT_ROOT}/vendor/shopware/administration"}" 9 | 10 | BIN_TOOL="${CWD}/console" 11 | 12 | if [[ ${CI} ]]; then 13 | BIN_TOOL="${CWD}/ci" 14 | chmod +x "$BIN_TOOL" 15 | fi 16 | 17 | # build admin 18 | [[ ${SHOPWARE_SKIP_BUNDLE_DUMP} ]] || "${BIN_TOOL}" bundle:dump 19 | 20 | if [[ $(command -v jq) ]]; then 21 | OLDPWD=$(pwd) 22 | cd "$PROJECT_ROOT" || exit 23 | 24 | jq -c '.[]' "var/plugins.json" | while read -r config; do 25 | srcPath=$(echo "$config" | jq -r '(.basePath + .administration.path)') 26 | 27 | # the package.json files are always one upper 28 | path=$(dirname "$srcPath") 29 | name=$(echo "$config" | jq -r '.technicalName' ) 30 | 31 | if [[ -f "$path/package.json" && ! -f "$path/node_modules" && $name != "administration" ]]; then 32 | echo "=> Installing npm dependencies for ${name}" 33 | 34 | if [[ -f "$path/package-lock.json" ]]; then 35 | npm clean-install --prefix "$path" 36 | else 37 | npm install --prefix "$path" 38 | fi 39 | fi 40 | done 41 | cd "$OLDPWD" || exit 42 | else 43 | echo "Cannot check extensions for required npm installations as jq is not installed" 44 | fi 45 | 46 | (cd "${ADMIN_ROOT}"/Resources/app/administration && npm clean-install && npm run build) 47 | [[ ${SHOPWARE_SKIP_ASSET_COPY} ]] ||"${BIN_TOOL}" asset:install 48 | 49 | -------------------------------------------------------------------------------- /bin/build-storefront.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)" 4 | 5 | export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$CWD")"}" 6 | STOREFRONT_ROOT="${STOREFRONT_ROOT:-"${PROJECT_ROOT}/vendor/shopware/storefront"}" 7 | 8 | BIN_TOOL="${CWD}/console" 9 | 10 | if [[ ${CI} ]]; then 11 | BIN_TOOL="${CWD}/ci" 12 | chmod +x "$BIN_TOOL" 13 | fi 14 | 15 | # build storefront 16 | [[ ${SHOPWARE_SKIP_BUNDLE_DUMP} ]] || "${BIN_TOOL}" bundle:dump 17 | 18 | if [[ $(command -v jq) ]]; then 19 | OLDPWD=$(pwd) 20 | cd "$PROJECT_ROOT" || exit 21 | 22 | jq -c '.[]' "var/plugins.json" | while read -r config; do 23 | srcPath=$(echo "$config" | jq -r '(.basePath + .storefront.path)') 24 | 25 | # the package.json files are always one upper 26 | path=$(dirname "$srcPath") 27 | name=$(echo "$config" | jq -r '.technicalName' ) 28 | 29 | if [[ -f "$path/package.json" && ! -f "$path/node_modules" && $name != "storefront" ]]; then 30 | echo "=> Installing npm dependencies for ${name}" 31 | 32 | if [[ -f "$path/package-lock.json" ]]; then 33 | npm clean-install --prefix "$path" 34 | else 35 | npm install --prefix "$path" 36 | fi 37 | fi 38 | done 39 | cd "$OLDPWD" || exit 40 | else 41 | echo "Cannot check extensions for required npm installations as jq is not installed" 42 | fi 43 | 44 | npm --prefix "${STOREFRONT_ROOT}"/Resources/app/storefront clean-install 45 | node "${STOREFRONT_ROOT}"/Resources/app/storefront/copy-to-vendor.js 46 | npm --prefix "${STOREFRONT_ROOT}"/Resources/app/storefront run production 47 | [[ ${SHOPWARE_SKIP_ASSET_COPY} ]] ||"${BIN_TOOL}" asset:install 48 | [[ ${SHOPWARE_SKIP_THEME_COMPILE} ]] || "${BIN_TOOL}" theme:compile 49 | -------------------------------------------------------------------------------- /bin/deleted_files_vendor.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | main() { 4 | while getopts "ho:n:d:" OPTION 5 | do 6 | case $OPTION in 7 | h) 8 | usage 9 | exit 1 10 | ;; 11 | o) 12 | original_dir="$(realpath "$OPTARG")/" 13 | ;; 14 | n) 15 | new_dir="$(realpath "$OPTARG")/" 16 | ;; 17 | ?) 18 | usage 19 | exit 20 | ;; 21 | *) 22 | usage 23 | exit 24 | ;; 25 | esac 26 | done 27 | 28 | if [[ -z "${original_dir:-}" ]]; then 29 | echo "The original directory not set (-o)." 30 | exit 1; 31 | fi 32 | 33 | if [[ -z "${new_dir:-}" ]]; then 34 | echo "The new directory not set (-n)." 35 | exit 1; 36 | fi 37 | 38 | if [ ! -d "$new_dir" ]; then 39 | echo "The new directory $new_dir does not exist." 40 | exit 1; 41 | fi 42 | 43 | if [ ! -d "$original_dir" ]; then 44 | echo "The original directory ($original_dir) does not exist." 45 | exit 1; 46 | fi 47 | 48 | diff_directories_find_deleted "${original_dir}" "${new_dir}" 49 | } 50 | 51 | diff_directories_find_deleted() { 52 | originalDir=$1; shift 53 | newDir=$1; shift 54 | cutDir=$(dirname "${originalDir}") 55 | 56 | diff -rq "${originalDir}" "${newDir}" | 57 | grep "^Only in ${originalDir}" | 58 | sed -n 's/://p' | 59 | awk '{print $3"/"$4}' | 60 | sed "s|${cutDir}||" | 61 | sed "s|^/||" | 62 | sed "s|//|/|" 63 | } 64 | 65 | usage() { 66 | cat << EOF 67 | usage: $0 options 68 | 69 | OPTIONS: 70 | -h Show this message 71 | -o Original directory 72 | -n New directory 73 | EOF 74 | } 75 | 76 | main "$@" 77 | -------------------------------------------------------------------------------- /config/README.md: -------------------------------------------------------------------------------- 1 | # Configuration 2 | 3 | This README describes how to change the configuration. 4 | 5 | ## Overview 6 | 7 | ```text 8 | config/ 9 | ├── bundles.php # defines static symfony bundles - use plugins for dynamic bundles 10 | ├── etc # contains the configuration of the docker image 11 | ├── jwt # secrets for generating jwt tokens - DO NOT COMMIT these secrets 12 | ├── packages/ # package configuration 13 | ├── services/ # additional service configuration files 14 | ├── README.md # this file 15 | ├── services.xml # just imports the defaults 16 | └── services_test.xml # just imports the test defaults 17 | ``` 18 | 19 | ## `config/bundles.php` 20 | 21 | The `bundles.php` defines all static bundles the kernel should load. If 22 | you dont need our storefront or the administration you can remove the 23 | bundle from this file and it will stop being loaded. To completely remove 24 | it you can also stop requiring the package in the `composer.json`. 25 | 26 | 27 | ## `config/packages/*.yml` 28 | 29 | `.yml` files for packages contained in this directory are loaded automatically. 30 | 31 | ### Shopware config `config/packages/shopware.yml` 32 | 33 | Define shopware specific configuration. 34 | 35 | This file can be added to override the defaults defined in `vendor/shopware/core/Framework/Resources/config/packages/shopware.yaml`. 36 | 37 | Example: 38 | 39 | ```yaml 40 | shopware: 41 | api: 42 | max_limit: 1000 # change limit from 500 to 1000 43 | 44 | admin_worker: 45 | enable_admin_worker: false # disable admin worker - use a different one! 46 | 47 | auto_update: 48 | enabled: false # disable auto update 49 | 50 | ``` 51 | 52 | ## `config/services.xml` 53 | 54 | Imports defaults from `config/services/defaults.xml` and can be used to override and add service definitions and parameters. 55 | 56 | -------------------------------------------------------------------------------- /config/packages/monolog.yaml: -------------------------------------------------------------------------------- 1 | when@dev: 2 | monolog: 3 | handlers: 4 | main: 5 | type: stream 6 | path: "%kernel.logs_dir%/%kernel.environment%.log" 7 | level: debug 8 | channels: ["!event"] 9 | # uncomment to get logging in your browser 10 | # you may have to allow bigger header sizes in your Web server configuration 11 | #firephp: 12 | # type: firephp 13 | # level: info 14 | #chromephp: 15 | # type: chromephp 16 | # level: info 17 | console: 18 | type: console 19 | process_psr_3_messages: false 20 | channels: ["!event", "!doctrine", "!console"] 21 | 22 | when@test: 23 | monolog: 24 | handlers: 25 | main: 26 | type: fingers_crossed 27 | action_level: error 28 | handler: nested 29 | excluded_http_codes: [404, 405] 30 | channels: ["!event"] 31 | nested: 32 | type: stream 33 | path: "%kernel.logs_dir%/%kernel.environment%.log" 34 | level: debug 35 | 36 | when@prod: 37 | monolog: 38 | handlers: 39 | main: 40 | type: fingers_crossed 41 | action_level: error 42 | handler: nested 43 | excluded_http_codes: [404, 405] 44 | buffer_size: 50 # How many messages should be saved? Prevent memory leaks 45 | nested: 46 | type: stream 47 | path: php://stderr 48 | level: debug 49 | formatter: monolog.formatter.json 50 | console: 51 | type: console 52 | process_psr_3_messages: false 53 | channels: ["!event", "!doctrine"] 54 | -------------------------------------------------------------------------------- /install-redis.sh: -------------------------------------------------------------------------------- 1 | run() { 2 | # Run the compilation process. 3 | cd $PLATFORM_CACHE_DIR || exit 1; 4 | 5 | if [ ! -f "${PLATFORM_CACHE_DIR}/phpredis/modules/redis.so" ]; then 6 | ensure_source 7 | checkout_version "$1" 8 | compile_source 9 | fi 10 | 11 | copy_lib 12 | enable_lib 13 | } 14 | 15 | enable_lib() { 16 | # Tell PHP to enable the extension. 17 | echo "Enabling PhpRedis extension." 18 | echo "extension=${PLATFORM_APP_DIR}/redis.so" >> $PLATFORM_APP_DIR/php.ini 19 | } 20 | 21 | copy_lib() { 22 | # Copy the compiled library to the application directory. 23 | echo "Installing PhpRedis extension." 24 | cp $PLATFORM_CACHE_DIR/phpredis/modules/redis.so $PLATFORM_APP_DIR 25 | } 26 | 27 | checkout_version () { 28 | # Check out the specific Git tag that we want to build. 29 | git checkout "$1" 30 | } 31 | 32 | ensure_source() { 33 | # Ensure that the extension source code is available and up to date. 34 | if [ -d "phpredis" ]; then 35 | cd phpredis || exit 1; 36 | git fetch --all --prune 37 | else 38 | git clone https://github.com/phpredis/phpredis.git 39 | cd phpredis || exit 1; 40 | fi 41 | } 42 | 43 | compile_source() { 44 | # Compile the extension. 45 | phpize 46 | ./configure 47 | make 48 | } 49 | 50 | ensure_environment() { 51 | # If not running in a Platform.sh build environment, do nothing. 52 | if [[ -z "${PLATFORM_CACHE_DIR}" ]]; then 53 | echo "Not running in a Platform.sh build environment. Aborting Redis installation." 54 | exit 0; 55 | fi 56 | } 57 | 58 | ensure_arguments() { 59 | # If no version was specified, don't try to guess. 60 | if [ -z $1 ]; then 61 | echo "No version of the PhpRedis extension specified. You must specify a tagged version on the command line." 62 | exit 1; 63 | fi 64 | } 65 | 66 | ensure_environment 67 | ensure_arguments "$1" 68 | run "$1" 69 | -------------------------------------------------------------------------------- /bin/ci: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | usePutenv()->load($envFile); 22 | } 23 | 24 | if (!isset($_SERVER['PROJECT_ROOT'])) { 25 | $_SERVER['PROJECT_ROOT'] = dirname(__DIR__); 26 | } 27 | 28 | $input = new ArgvInput(); 29 | $env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'prod', true); 30 | $debug = ($_SERVER['APP_DEBUG'] ?? ($env !== 'prod')) && !$input->hasParameterOption('--no-debug', true); 31 | 32 | $pluginLoader = new StaticKernelPluginLoader($classLoader, null); 33 | 34 | if (trim($_SERVER['DATABASE_URL'] ?? '') === '') { 35 | // fake DATABASE_URL 36 | $_SERVER['DATABASE_URL'] = Kernel::PLACEHOLDER_DATABASE_URL; 37 | 38 | if (\class_exists(ComposerPluginLoader::class) && method_exists(InstalledVersions::class, 'getInstalledPackagesByType')) { 39 | $pluginLoader = new ComposerPluginLoader($classLoader, null); 40 | } 41 | } else { 42 | if (!isset($_SERVER['INSTALL'])) { 43 | $pluginLoader = new DbalKernelPluginLoader($classLoader, null, \Shopware\Core\Kernel::getConnection()); 44 | } 45 | } 46 | 47 | if ($debug) { 48 | umask(0000); 49 | if (class_exists(Debug::class)) { 50 | Debug::enable(); 51 | } 52 | } 53 | 54 | $kernel = new HttpKernel($env, $debug, $classLoader); 55 | $kernel->setPluginLoader($pluginLoader); 56 | $application = new Application($kernel->getKernel()); 57 | $application->run($input); 58 | -------------------------------------------------------------------------------- /config/fastly/recv.vcl: -------------------------------------------------------------------------------- 1 | # Mitigate httpoxy application vulnerability, see: https://httpoxy.org/ 2 | unset req.http.Proxy; 3 | 4 | # Strip query strings only needed by browser javascript. Customize to used tags. 5 | if (req.url != req.url.path) { 6 | set req.url = querystring.filter(req.url, 7 | "pk_campaign" + querystring.filtersep() + 8 | "piwik_campaign" + querystring.filtersep() + 9 | "pk_kwd" + querystring.filtersep() + 10 | "piwik_kwd" + querystring.filtersep() + 11 | "pk_keyword" + querystring.filtersep() + 12 | "pixelId" + querystring.filtersep() + 13 | "kwid" + querystring.filtersep() + 14 | "kw" + querystring.filtersep() + 15 | "adid" + querystring.filtersep() + 16 | "chl" + querystring.filtersep() + 17 | "dv" + querystring.filtersep() + 18 | "nk" + querystring.filtersep() + 19 | "pa" + querystring.filtersep() + 20 | "camid" + querystring.filtersep() + 21 | "adgid" + querystring.filtersep() + 22 | "cx" + querystring.filtersep() + 23 | "ie" + querystring.filtersep() + 24 | "cof" + querystring.filtersep() + 25 | "siteurl" + querystring.filtersep() + 26 | "utm_source" + querystring.filtersep() + 27 | "utm_medium" + querystring.filtersep() + 28 | "utm_campaign" + querystring.filtersep() + 29 | "_ga" + querystring.filtersep() + 30 | "gclid" 31 | ); 32 | } 33 | 34 | # Normalize query arguments 35 | set req.url = querystring.sort(req.url); 36 | 37 | # Make sure that the client ip is forward to the client. 38 | if (req.http.x-forwarded-for) { 39 | set req.http.X-Forwarded-For = req.http.X-Forwarded-For + ", " + client.ip; 40 | } else { 41 | set req.http.X-Forwarded-For = client.ip; 42 | } 43 | 44 | # Normally, you should consider requests other than GET and HEAD to be uncacheable 45 | # (to this we add the special FASTLYPURGE method) 46 | if (req.method != "HEAD" && req.method != "GET" && req.method != "FASTLYPURGE") { 47 | return(pass); 48 | } 49 | 50 | # Don't cache Authenticate & Authorization 51 | if (req.http.Authenticate || req.http.Authorization) { 52 | return (pass); 53 | } 54 | 55 | # Always pass these paths directly to php without caching 56 | # Note: virtual URLs might bypass this rule (e.g. /en/checkout) 57 | if (req.url.path ~ "^/(checkout|account|admin|api)(/.*)?$") { 58 | return (pass); 59 | } 60 | 61 | return (lookup); 62 | -------------------------------------------------------------------------------- /src/TestBootstrap.php: -------------------------------------------------------------------------------- 1 | 'test', 11 | 'APP_DEBUG' => 1, 12 | 'APP_SECRET' => 's$cretf0rt3st', 13 | 'KERNEL_CLASS' => \Shopware\Production\Kernel::class, 14 | 'SHOPWARE_ES_ENABLED' => '', 15 | 'BLUE_GREEN_DEPLOYMENT' => 1, 16 | 'SHOPWARE_ES_INDEXING_ENABLED' => '', 17 | 'JWT_PRIVATE_KEY_PASSPHRASE' => 'shopware', 18 | 'VERSION' => $_SERVER['VERSION'] ?? $_SERVER['BUILD_VERSION'] ?? 'v6.1.0', 19 | ]; 20 | 21 | foreach ($testEnv as $key => $value) { 22 | $_ENV[$key] = $_SERVER[$key] = $value; 23 | } 24 | 25 | $jwtDir = TEST_PROJECT_DIR . '/var/test/jwt'; 26 | 27 | if (!file_exists($jwtDir) && !mkdir($jwtDir, 0770, true) && !is_dir($jwtDir)) { 28 | throw new \RuntimeException(sprintf('Directory "%s" was not created', $jwtDir)); 29 | } 30 | 31 | // generate jwt pk 32 | $key = openssl_pkey_new([ 33 | 'digest_alg' => 'aes256', 34 | 'private_key_type' => \OPENSSL_KEYTYPE_RSA, 35 | 'encrypt_key_cipher' => \OPENSSL_CIPHER_AES_256_CBC, 36 | 'encrypt_key' => $_SERVER['JWT_PRIVATE_KEY_PASSPHRASE'], 37 | ]); 38 | 39 | // export private key 40 | $result = openssl_pkey_export_to_file($key, $jwtDir . '/private.pem'); 41 | if ($result === false) { 42 | throw new RuntimeException('Could not export private key to file'); 43 | } 44 | 45 | // export public key 46 | $keyData = openssl_pkey_get_details($key); 47 | file_put_contents($jwtDir . '/public.pem', $keyData['key']); 48 | 49 | chmod($jwtDir . '/private.pem', 0660); 50 | chmod($jwtDir . '/public.pem', 0660); 51 | 52 | $loader = require TEST_PROJECT_DIR . '/vendor/autoload.php'; 53 | 54 | KernelLifecycleManager::prepare($loader); 55 | 56 | if (file_exists(TEST_PROJECT_DIR . '/.env.test')) { 57 | if (!class_exists(Dotenv::class)) { 58 | throw new RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env.test file.'); 59 | } 60 | (new Dotenv()) 61 | ->usePutenv(true) 62 | ->load(TEST_PROJECT_DIR . '/.env.test'); 63 | } 64 | -------------------------------------------------------------------------------- /bin/console: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env php 2 | usePutenv()->load($envFile); 31 | } 32 | 33 | if (!isset($_SERVER['PROJECT_ROOT'])) { 34 | $_SERVER['PROJECT_ROOT'] = dirname(__DIR__); 35 | } 36 | 37 | $input = new ArgvInput(); 38 | $env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'prod', true); 39 | $debug = ($_SERVER['APP_DEBUG'] ?? ($env !== 'prod')) && !$input->hasParameterOption('--no-debug', true); 40 | 41 | if ($debug) { 42 | umask(0000); 43 | 44 | if (class_exists(Debug::class)) { 45 | Debug::enable(); 46 | } 47 | } 48 | 49 | $pluginLoader = new StaticKernelPluginLoader($classLoader, null); 50 | 51 | $shopwareVersion = InstalledVersions::getVersion('shopware/core') . '@' . InstalledVersions::getReference('shopware/core'); 52 | 53 | if ($input->getFirstArgument() === 'system:install') { 54 | $_SERVER['INSTALL'] = true; 55 | } 56 | 57 | if (trim($_SERVER['DATABASE_URL'] ?? '') === '') { 58 | // fake DATABASE_URL 59 | $_SERVER['DATABASE_URL'] = Kernel::PLACEHOLDER_DATABASE_URL; 60 | } else { 61 | if (!isset($_SERVER['INSTALL'])) { 62 | $pluginLoader = new DbalKernelPluginLoader($classLoader, null, \Shopware\Core\Kernel::getConnection()); 63 | } 64 | } 65 | 66 | $kernel = new HttpKernel($env, $debug, $classLoader); 67 | $kernel->setPluginLoader($pluginLoader); 68 | 69 | $application = new Application($kernel->getKernel()); 70 | $application->run($input); 71 | -------------------------------------------------------------------------------- /config/services/defaults.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | shopware 7 | 8 | 9 | sw 10 | 11 | %env(bool:default:default_whitespace:SHOPWARE_ES_ENABLED)% 12 | %env(bool:default:default_whitespace:SHOPWARE_ES_INDEXING_ENABLED)% 13 | %env(string:default:default_whitespace:SHOPWARE_ES_HOSTS)% 14 | %env(string:default:default_elasticsearch_prefix:SHOPWARE_ES_INDEX_PREFIX)% 15 | 16 | true 17 | 18 | physical_filename 19 | install 20 | %env(default:default_cdn_strategy:SHOPWARE_CDN_STRATEGY_DEFAULT)% 21 | 22 | 0 23 | rediscache.internal 24 | 6379 25 | 26 | 27 | 28 | 29 | 30 | %kernel.project_dir%/config/jwt/private.pem 31 | %env(string:default:jwt_private_key_passphrase_default:JWT_PRIVATE_KEY_PASSPHRASE)% 32 | 33 | 34 | 35 | %kernel.project_dir%/config/jwt/public.pem 36 | 37 | 38 | 39 | %env(bool:SHOPWARE_ES_ENABLED)% 40 | %env(bool:SHOPWARE_ES_INDEXING_ENABLED)% 41 | %env(SHOPWARE_ES_HOSTS)% 42 | %env(SHOPWARE_ES_INDEX_PREFIX)% 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /public/index.php: -------------------------------------------------------------------------------- 1 | Error'; 12 | echo 'Your server is running PHP version ' . \PHP_VERSION . ' but Shopware 6 requires at least PHP 7.4.0'; 13 | exit(1); 14 | } 15 | 16 | $classLoader = require __DIR__ . '/../vendor/autoload.php'; 17 | 18 | if (!file_exists(dirname(__DIR__) . '/install.lock')) { 19 | $basePath = 'recovery/install'; 20 | $baseURL = str_replace(basename(__FILE__), '', $_SERVER['SCRIPT_NAME']); 21 | $baseURL = rtrim($baseURL, '/'); 22 | $installerURL = $baseURL . '/' . $basePath . '/index.php'; 23 | if (strpos($_SERVER['REQUEST_URI'], $basePath) === false) { 24 | header('Location: ' . $installerURL); 25 | exit; 26 | } 27 | } 28 | 29 | if (is_file(dirname(__DIR__) . '/files/update/update.json') || is_dir(dirname(__DIR__) . '/update-assets')) { 30 | header('Content-type: text/html; charset=utf-8', true, 503); 31 | header('Status: 503 Service Temporarily Unavailable'); 32 | header('Retry-After: 1200'); 33 | if (file_exists(__DIR__ . '/maintenance.html')) { 34 | readfile(__DIR__ . '/maintenance.html'); 35 | } else { 36 | readfile(__DIR__ . '/recovery/update/maintenance.html'); 37 | } 38 | 39 | return; 40 | } 41 | 42 | // The check is to ensure we don't use .env if APP_ENV is defined 43 | if (!isset($_SERVER['APP_ENV']) && !isset($_ENV['APP_ENV'])) { 44 | if (!class_exists(Dotenv::class)) { 45 | throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.'); 46 | } 47 | $envFile = __DIR__ . '/../.env'; 48 | if (file_exists($envFile)) { 49 | (new Dotenv()) 50 | ->usePutenv(true) 51 | ->load($envFile); 52 | } 53 | } 54 | 55 | $appEnv = $_SERVER['APP_ENV'] ?? $_ENV['APP_ENV'] ?? 'dev'; 56 | $debug = (bool) ($_SERVER['APP_DEBUG'] ?? $_ENV['APP_DEBUG'] ?? ($appEnv !== 'prod')); 57 | 58 | if ($debug) { 59 | umask(0000); 60 | 61 | Debug::enable(); 62 | } 63 | 64 | $trustedProxies = $_SERVER['TRUSTED_PROXIES'] ?? $_ENV['TRUSTED_PROXIES'] ?? false; 65 | if ($trustedProxies) { 66 | Request::setTrustedProxies(explode(',', $trustedProxies), Request::HEADER_X_FORWARDED_FOR | Request::HEADER_X_FORWARDED_PORT | Request::HEADER_X_FORWARDED_PROTO); 67 | } 68 | 69 | $trustedHosts = $_SERVER['TRUSTED_HOSTS'] ?? $_ENV['TRUSTED_HOSTS'] ?? false; 70 | if ($trustedHosts) { 71 | Request::setTrustedHosts(explode(',', $trustedHosts)); 72 | } 73 | 74 | $request = Request::createFromGlobals(); 75 | 76 | $kernel = new HttpKernel($appEnv, $debug, $classLoader); 77 | $result = $kernel->handle($request); 78 | 79 | $result->getResponse()->send(); 80 | 81 | $kernel->terminate($result->getRequest(), $result->getResponse()); 82 | -------------------------------------------------------------------------------- /setup-fastly.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # fail on error 4 | set -e 5 | 6 | if [[ -z "$FASTLY_API_TOKEN" ]]; then 7 | echo "Environment variable FASTLY_API_TOKEN is not set. Skipping" 8 | exit 0 9 | fi 10 | 11 | if [[ -z "$FASTLY_SERVICE_ID" ]]; then 12 | echo "Environment variable FASTLY_SERVICE_ID is not set. Skipping" 13 | exit 0 14 | fi 15 | 16 | created_version=0 17 | 18 | create_version_if_not_done() { 19 | if [[ "$created_version" == "1" ]]; then 20 | return 21 | fi 22 | 23 | echo "Creating version from active version" 24 | fastly service-version clone --version=active 25 | created_version=1 26 | } 27 | 28 | get_md5() 29 | { 30 | if builtin command -v md5 > /dev/null; then 31 | echo "$1" | md5 32 | elif builtin command -v md5sum > /dev/null ; then 33 | echo "$1" | md5sum | awk '{print $1}' 34 | else 35 | echo "Neither md5 nor md5sum were found in the PATH" 36 | return 1 37 | fi 38 | 39 | return 0 40 | } 41 | 42 | install_fastly_cli() { 43 | if [[ -d "/tmp/fastly" ]]; then 44 | export PATH="/tmp/fastly:$PATH" 45 | return 46 | fi 47 | 48 | mkdir /tmp/fastly 49 | 50 | arch=$(uname -m) 51 | os="linux" 52 | 53 | if [[ "$arch" == "x86_64" ]]; then 54 | arch="amd64" 55 | fi 56 | 57 | if [[ "$OSTYPE" == "darwin"* ]]; then 58 | os="darwin" 59 | fi 60 | 61 | echo "Detected OS: ${os} and architecture: ${arch}" 62 | 63 | file="https://github.com/fastly/cli/releases/download/v2.0.0/fastly_v2.0.0_${os}-${arch}.tar.gz" 64 | 65 | echo "Downloading ${file}" 66 | 67 | curl -L "${file}" | tar xz -C /tmp/fastly/ 68 | export PATH="/tmp/fastly:$PATH" 69 | } 70 | 71 | install_fastly_cli 72 | 73 | # Fastly tries to write into /app on platformsh and this throws an error 74 | export HOME=/tmp 75 | 76 | for vcl in ./config/fastly/*.vcl; do 77 | trigger=$(basename $vcl .vcl) 78 | name="shopware_${trigger}" 79 | 80 | if fastly vcl snippet describe --version=latest "--name=$name" > /dev/null; then 81 | # The snippet exists on remote 82 | localContent=$(cat "$vcl") 83 | localContentMd5=$(get_md5 "$localContent") 84 | 85 | remoteContent=$(fastly vcl snippet describe --version=latest "--name=$name" --json | jq -r '.Content') 86 | remoteContentMd5=$(get_md5 "$remoteContent") 87 | 88 | if [[ "$localContentMd5" != "$remoteContentMd5" ]]; then 89 | echo "Snippet ${trigger} has changed. Updating" 90 | 91 | create_version_if_not_done 92 | 93 | fastly vcl snippet update "--name=shopware_${trigger}" "--content=${vcl}" "--type=${trigger}" --version=latest 94 | else 95 | echo "Snippet ${trigger} is up to date" 96 | fi 97 | else 98 | create_version_if_not_done 99 | 100 | fastly vcl snippet create "--name=shopware_${trigger}" "--content=${vcl}" "--type=${trigger}" --version=latest 101 | fi 102 | done 103 | 104 | if [[ "$created_version" == "1" ]]; then 105 | echo "Activating latest version" 106 | 107 | fastly service-version activate --version latest 108 | fi 109 | 110 | -------------------------------------------------------------------------------- /bin/package.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | echo "$@" 4 | 5 | BIN_DIR="$(cd -P -- "$(dirname -- "${BASH_SOURCE:-${0}}")" && pwd -P)" 6 | export PROJECT_ROOT="${PROJECT_ROOT:-"$(dirname "$BIN_DIR")"}" 7 | export ARTIFACTS_DIR="${ARTIFACTS_DIR:-"$PROJECT_ROOT/artifacts"}" 8 | 9 | DEFAULT_ENV_FILENAME=".env.defaults" 10 | ADDITIONAL_UPDATE_FILES="$1" 11 | ADDITIONAL_DELETED_FILES="$2" 12 | 13 | set -o errexit 14 | 15 | # cleanup 16 | 17 | cd "${PROJECT_ROOT}" 18 | 19 | rm -rf var/cache/* \ 20 | var/log/* \ 21 | var/queue/* \ 22 | var/test/* \ 23 | vendor/symfony/*/Tests \ 24 | vendor/twig/twig/test \ 25 | vendor/swiftmailer/swiftmailer/tests \ 26 | vendor/google/auth/tests \ 27 | vendor/monolog/monolog/tests \ 28 | vendor/phenx/php-font-lib/sample-fonts \ 29 | install.lock 30 | 31 | CORE_TAG=$(php -r 'include_once "vendor/autoload.php"; echo ltrim(explode("@", Composer\InstalledVersions::getVersion("shopware/core"))[0], "v");') 32 | 33 | if [ -n "$DEFAULT_ENV" ]; then 34 | echo "$DEFAULT_ENV" > "$DEFAULT_ENV_FILENAME" 35 | fi 36 | 37 | REFERENCE_INSTALLER_URL=${REFERENCE_INSTALLER_URL:-"https://releases.shopware.com/sw6/install_6.2.1_1592219982.zip"} 38 | REFERENCE_INSTALLER_SHA256=${REFERENCE_INSTALLER_SHA256:-"721dc18ff8c8f14cfe38bc731b4627e94119be5c1a03396b3234d837895f1806"} 39 | REFERENCE_INSTALLER_FILE="$ARTIFACTS_DIR/reference.zip" 40 | 41 | # make update 42 | if [ -n "$REFERENCE_INSTALLER_URL" ]; then 43 | if [ ! -f "$REFERENCE_INSTALLER_FILE" ]; then 44 | curl -sS "${REFERENCE_INSTALLER_URL}" -o "$REFERENCE_INSTALLER_FILE" 45 | fi 46 | 47 | HASH_CHECK_LINE="$REFERENCE_INSTALLER_SHA256 $REFERENCE_INSTALLER_FILE" 48 | echo "${HASH_CHECK_LINE}" | sha256sum -c - 49 | 50 | set -x 51 | 52 | REFERENCE_TEMP_DIR=$(mktemp -d) 53 | cd "$REFERENCE_TEMP_DIR" 54 | mv "$REFERENCE_INSTALLER_FILE" . 55 | unzip -qq ./*.zip 56 | 57 | UPDATE_TEMP_DIR=$(mktemp -d) 58 | 59 | # fix permissions of reference 60 | cp -f -a --attributes-only "$PROJECT_ROOT/." "$REFERENCE_TEMP_DIR" 61 | 62 | # copy files that changed between the reference and the new version 63 | rsync -rvcmq --compare-dest="$REFERENCE_TEMP_DIR" "$PROJECT_ROOT/" "$UPDATE_TEMP_DIR/" 64 | 65 | if [ -r "$ADDITIONAL_UPDATE_FILES" ]; then 66 | rsync -av --files-from="$ADDITIONAL_UPDATE_FILES" "$PROJECT_ROOT/" "$UPDATE_TEMP_DIR/" 67 | fi 68 | 69 | cd "$UPDATE_TEMP_DIR" 70 | 71 | # add update meta information 72 | mkdir update-assets 73 | echo "$CORE_TAG" > update-assets/version 74 | if [ -n "$DEFAULT_ENV" ]; then 75 | rm "$DEFAULT_ENV_FILENAME" || true 76 | echo "$DEFAULT_ENV" > "update-assets/$DEFAULT_ENV_FILENAME" 77 | fi 78 | 79 | "${PROJECT_ROOT}"/bin/deleted_files_vendor.sh -o"$REFERENCE_TEMP_DIR/vendor" -n"$PROJECT_ROOT/vendor" > update-assets/cleanup.txt 80 | 81 | if [ -r "$ADDITIONAL_DELETED_FILES" ]; then 82 | cat "$ADDITIONAL_DELETED_FILES" >> update-assets/cleanup.txt 83 | fi 84 | 85 | sort update-assets/cleanup.txt | uniq > update-assets/cleanup.txt.sorted 86 | mv update-assets/cleanup.txt.sorted update-assets/cleanup.txt 87 | 88 | cp update-assets/cleanup.txt "$ARTIFACTS_DIR"/cleanup.txt 89 | 90 | zip -qq -9 -r "$ARTIFACTS_DIR/update.zip" . 91 | fi 92 | 93 | # installer 94 | 95 | cd "${PROJECT_ROOT}" 96 | 97 | zip -qq -9 -r "$ARTIFACTS_DIR/install.zip" . 98 | 99 | if command -v xz >/dev/null 2>&1; then 100 | tar -cf - . | xz -9 -z > "${ARTIFACTS_DIR}"/install.tar.xz 101 | fi 102 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "shopware/production", 3 | "type": "project", 4 | "license": "MIT", 5 | "config": { 6 | "optimize-autoloader": true, 7 | "platform": { 8 | "php": "7.4.3" 9 | }, 10 | "sort-packages": true, 11 | "allow-plugins": { 12 | "composer/package-versions-deprecated": true 13 | } 14 | }, 15 | "prefer-stable": true, 16 | "minimum-stability": "stable", 17 | "scripts": { 18 | "pre-install-cmd": [ 19 | "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare" 20 | ], 21 | "pre-update-cmd": [ 22 | "[ ! -f vendor/autoload.php ] || $PHP_BINARY bin/console system:update:prepare" 23 | ], 24 | "post-install-cmd": [ 25 | "@composer install --working-dir vendor/shopware/recovery --no-interaction --no-scripts", 26 | "@composer install --working-dir=vendor/shopware/recovery/Common --no-interaction --optimize-autoloader --no-suggest", 27 | "[ ! -f install.lock ] || $PHP_BINARY bin/console system:update:finish" 28 | ], 29 | "post-update-cmd": [ 30 | "@composer install --working-dir vendor/shopware/recovery --no-interaction --no-scripts", 31 | "@composer install --working-dir=vendor/shopware/recovery/Common --no-interaction --optimize-autoloader --no-suggest", 32 | "[ ! -f install.lock ] || $PHP_BINARY bin/console system:update:finish" 33 | ] 34 | }, 35 | "autoload": { 36 | "psr-4": { 37 | "Shopware\\Production\\": "src/" 38 | }, 39 | "files": [ 40 | "platformsh-env.php" 41 | ] 42 | }, 43 | "repositories": [ 44 | { 45 | "type": "path", 46 | "url": "custom/plugins/*/packages/*", 47 | "options": { 48 | "symlink": true 49 | } 50 | }, 51 | { 52 | "type": "path", 53 | "url": "custom/static-plugins/*", 54 | "options": { 55 | "symlink": true 56 | } 57 | } 58 | ], 59 | "require": { 60 | "php": "^7.4.3 || ^8.0", 61 | "composer-runtime-api": "^2.0", 62 | "shopware/administration": "~v6.4.8", 63 | "shopware/core": "~v6.4.8", 64 | "shopware/elasticsearch": "~v6.4.8", 65 | "shopware/recovery": "~v6.4.8", 66 | "shopware/storefront": "~v6.4.8", 67 | "platformsh/symfonyflex-bridge": "^2.2" 68 | }, 69 | "require-dev": { 70 | "ext-openssl": "*", 71 | "ext-tokenizer": "*", 72 | "ext-xmlwriter": "*", 73 | "bheller/images-generator": "~1.0.1", 74 | "defuse/php-encryption": "~2.2.1", 75 | "dms/phpunit-arraysubset-asserts": "^0.2.1", 76 | "fzaninotto/faker": "~1.9.1", 77 | "johnkary/phpunit-speedtrap": "~3.3.0", 78 | "league/flysystem-memory": "~1.0.2", 79 | "mbezhanov/faker-provider-collection": "~1.2.1", 80 | "nikic/php-parser": "~4.10.4", 81 | "opis/json-schema": "~1.0.19", 82 | "phpunit/php-code-coverage": "~9.2.5", 83 | "phpunit/phpunit": "~9.5.2", 84 | "smalot/pdfparser": "~0.14.0", 85 | "symfony/browser-kit": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0", 86 | "symfony/dependency-injection": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0", 87 | "symfony/css-selector": "^5.3 || ~5.4.0", 88 | "symfony/dom-crawler": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0", 89 | "symfony/phpunit-bridge": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0", 90 | "symfony/stopwatch": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0", 91 | "symfony/var-dumper": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0", 92 | "symfony/web-profiler-bundle": "~4.4 || ~5.2.3 || ~5.3.0 || ~5.4.0" 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /platformsh-env.php: -------------------------------------------------------------------------------- 1 | inRuntime()) { 25 | return; 26 | } 27 | 28 | $config->registerFormatter('redis', __NAMESPACE__ . '\redisFormatter'); 29 | $config->registerFormatter('elasticsearch', __NAMESPACE__ . '\elasticsearchFormatter'); 30 | $config->registerFormatter('rabbitmq', __NAMESPACE__ . '\rabbitmqFormatter'); 31 | 32 | // Set the URL based on the route. This is a required route ID. 33 | setEnvVar('APP_URL', $config->getRoute('shopware')['url']); 34 | 35 | // Map services as feasible. 36 | mapPlatformShRedis('rediscache', $config); 37 | mapPlatformShElasticsearch('essearch', $config); 38 | mapPlatformShRabbitmq('rabbitmqqueue', $config); 39 | } 40 | 41 | /** 42 | * Sets an environment variable in all the myriad places PHP can store it. 43 | * 44 | * @param string $name 45 | * The name of the variable to set. 46 | * @param null|string $value 47 | * The value to set. Null to unset it. 48 | */ 49 | function setEnvVar(string $name, $value) : void 50 | { 51 | if (!putenv("$name=$value")) { 52 | throw new \RuntimeException('Failed to create environment variable: ' . $name); 53 | } 54 | $order = ini_get('variables_order'); 55 | if (stripos($order, 'e') !== false) { 56 | $_ENV[$name] = $value; 57 | } 58 | if (stripos($order, 's') !== false) { 59 | if (strpos($name, 'HTTP_') !== false) { 60 | throw new \RuntimeException('Refusing to add ambiguous environment variable ' . $name . ' to $_SERVER'); 61 | } 62 | $_SERVER[$name] = $value; 63 | } 64 | } 65 | 66 | /** 67 | * Maps the specified relationship to the REDIS_URL environment variable, if available. 68 | * 69 | * @param string $relationshipName 70 | * The database relationship name. 71 | * @param Config $config 72 | * The config object. 73 | */ 74 | function mapPlatformShRedis(string $relationshipName, Config $config) : void 75 | { 76 | if (!$config->hasRelationship($relationshipName)) { 77 | return; 78 | } 79 | $redis_credentials = $config->credentials($relationshipName); 80 | setEnvVar('REDIS_HOST', (string)$redis_credentials['host']); 81 | setEnvVar('REDIS_PORT', $redis_credentials['port']); 82 | 83 | setEnvVar('REDIS_URL', $config->formattedCredentials($relationshipName, 'redis')); 84 | } 85 | 86 | function redisFormatter(array $credentials): string 87 | { 88 | return "redis://{$credentials['host']}:{$credentials['port']}"; 89 | } 90 | 91 | /** 92 | * Maps the specified relationship to the elasticsearch environment variables, if available. 93 | * 94 | * @param string $relationshipName 95 | * The search index relationship name. 96 | * @param Config $config 97 | * The config object. 98 | */ 99 | function mapPlatformShElasticsearch(string $relationshipName, Config $config) : void 100 | { 101 | if (!$config->hasRelationship($relationshipName)) { 102 | return; 103 | } 104 | 105 | setEnvVar('SHOPWARE_ES_HOSTS', $config->formattedCredentials($relationshipName, 'elasticsearch')); 106 | setEnvVar('SHOPWARE_ES_INDEXING_ENABLED', '1'); 107 | setEnvVar('SHOPWARE_ES_INDEX_PREFIX', 'sw6'); 108 | // uncomment to enable elasticsearch 109 | // see https://developer.shopware.com/docs/guides/hosting/infrastructure/elasticsearch#activating-and-first-time-indexing 110 | // setEnvVar('SHOPWARE_ES_ENABLED', '1'); 111 | } 112 | 113 | function elasticsearchFormatter(array $credentials): string 114 | { 115 | return "http://{$credentials['host']}:{$credentials['port']}"; 116 | } 117 | 118 | /** 119 | * Maps the specified relationship to the rabbitmq environment variables, if available. 120 | * 121 | * @param string $relationshipName 122 | * The search index relationship name. 123 | * @param Config $config 124 | * The config object. 125 | */ 126 | function mapPlatformShRabbitmq(string $relationshipName, Config $config) : void 127 | { 128 | if (!$config->hasRelationship($relationshipName)) { 129 | return; 130 | } 131 | 132 | setEnvVar('RABBITMQ_URL', $config->formattedCredentials($relationshipName, 'rabbitmq')); 133 | } 134 | 135 | function rabbitmqFormatter(array $credentials): string 136 | { 137 | return "amqp://{$credentials['username']}:{$credentials['password']}@{$credentials['host']}:{$credentials['port']}/%2F?connection_timeout=1000&heartbeat=100&auto_setup=false"; 138 | } 139 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Shopware PaaS 2 | 3 | This template builds Shopware PaaS using Composer. To get started on PaaS, please visit [https://developer.shopware.com/docs/products/paas](https://developer.shopware.com/docs/products/enterprise-cloud) 4 | 5 | ## Services 6 | 7 | - PHP 8.0 8 | - MariaDB 10.5 9 | - Redis 6.0 10 | 11 | ## First deployment 12 | 13 | 1. The first time the site is deployed, Shopware's command line installer will run and initialize Shopware. It will not run again unless the `installer/installed` is removed. (Do not remove that file unless you want the installer to run on the next deploy!) 14 | 15 | 2. The installer will create an administrator account with username/password `admin`/`shopware`. **You need to change this password immediately. Not doing so is a security risk**. 16 | 17 | 3. As the theme assets are generated in the build hook and cannot be changed in runtime, we need to dump the theme configuration and run a second deployment to have theme assets build. See [Stateless Builds section](#stateless-builds) for this 18 | 19 | ## Customizations 20 | 21 | This project is built on the [shopware/production](https://github.com/shopware/production) repo. All plugins MUST be installed through Composer. The in-browser plugin manager will not work as the disk is read-only. 22 | 23 | The following changes have been made relative to a plain Shopware production project. If using this project as a reference for your own existing project, replicate the changes below to your project. 24 | 25 | - The `.platform.app.yaml`, `.platform/services.yaml`, and `.platform/routes.yaml` files have been added. These provide PaaS-specific configuration and are present in all projects on PaaS. You may customize them as you see fit. 26 | - An additional Composer library, [`platformsh/symfonyflex-bridge`](https://github.com/platformsh/symfonyflex-bridge), has been added. It is a bridge library which connects Symfony Flex-based application to PaaS. 27 | - The [`platformsh-env.php`](platformsh-env.php) file will map PaaS environment variables to the enviroment variables expected by Shopware. It is auto-included from `composer.json` as part of the autoload process. 28 | - Configuration has been added to use Redis for cache and sessions, see [`config/packages/framework.yaml`](config/packages/framework.yaml) 29 | - [`config/packages/shopware.yaml`](config/packages/shopware.yaml) has been updated to disable auto update 30 | - [`config/packages/shopware.yaml`](config/packages/shopware.yaml) has been updated to disable the admin worker (a message consumer is started instead, see the `workers` section in [`.platform.app.yaml`](.platform.app.yaml)) 31 | 32 | ## Stateless Builds 33 | 34 | This build uses ["Building without Database"](https://developer.shopware.com/docs/guides/hosting/installation-updates/deployments/build-w-o-db). 35 | 36 | To support the stateless build for the theme, the theme-config is checked into git for it being available during the build process (an alternative is to store it on an external object storage). 37 | 38 | To update the config 39 | 40 | > IMPORTANT: You have to run this once after the first install, otherwise the Frontend will not load css/js files correctly. 41 | 42 | - Dump the theme config e.g. via `platform ssh -A app 'bin/console theme:dump'` (this will generate new config files in files/theme config) 43 | - Download the the generated theme config via `platform mount:download --mount 'files' --target 'files' -A app` 44 | - You can then remove the old files and add the new files to git (`git add files/theme-config`, `git commit -m 'update theme config'`) 45 | - Commit and Push for a redeployment (`git push`) 46 | 47 | ## Optional additions 48 | 49 | ### Elasticsearch 50 | 51 | 1. Add Elasticsearch to [`.platform/services.yaml`](.platform/services.yaml) 52 | 2. Add a relationship for it in [`.platform.app.yaml`](.platform.app.yaml) 53 | 3. Follow the steps mentioned in the [documentation](https://developer.shopware.com/docs/guides/hosting/infrastructure/elasticsearch#activating-and-first-time-indexing) to prepare your instance. `SHOPWARE_ES_HOSTS`, `SHOPWARE_ES_INDEXING_ENABLED` and `SHOPWARE_ES_INDEX_PREFIX` are set in [`platformsh-env.php`](platformsh-env.php). 54 | 4. If all is good, you can enable via `SHOPWARE_ES_ENABLED` (either uncomment in [`platformsh-env.php`](platformsh-env.php) or add as a [`variable`](https://docs.platform.sh/development/variables.html)) 55 | 56 | ### RabbitMQ 57 | 58 | 1. Add RabbitMQ in [`.platform/services.yaml`](.platform/services.yaml) 59 | 2. Add a relationship for it in [`.platform.app.yaml`](.platform.app.yaml) 60 | 3. Push to Git (so RabbitMQ is provisioned) 61 | 4. For RabbitMQ to work, you need to manually add a queue named `shopware-queue` and a `messages` exchange. To do this you can e.g. use the platform CLI to open a tunnel (`ssh -L 15672:rabbitmqqueue.internal:15672 $(platform ssh --pipe -A app)`) and open the UI via `http://localhost:15672/`. You can get the credentials via `platform relationships`. `RABBITMQ_URL` is set in [`platformsh-env.php`](platformsh-env.php). 62 | 5. `composer require enqueue/amqp-bunny` 63 | 6. Uncomment [`config/packages/enqueue.yaml`](config/packages/enqueue.yaml) 64 | 65 | ### Fastly 66 | 67 | 1. Make sure you have at least Shopware 6.4.11.0 68 | 2. Make sure `FASTLY_API_TOKEN` and `FASTLY_SERVICE_ID` are set in the environment or contact Support when its missing. 69 | 3. Enable Fastly config in [`.platform.app.yaml`](.platform.app.yaml) by removing hashtag before `mv config/packages/fastly.yaml.dist config/packages/fastly.yaml` 70 | 4. Push the new config and Fastly is enabled 71 | 72 | ## References 73 | 74 | - [Shopware](https://www.shopware.com/en/) 75 | - [PHP on Platform.sh](https://docs.platform.sh/languages/php.html) 76 | -------------------------------------------------------------------------------- /public/maintenance.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Wartungsmodus 6 | 7 | 111 | 112 | 113 |
114 |

Unsere Website befindet sich gerade in der Wartung.

115 | 116 |

117 | Wir stehen Ihnen bald wieder zur Verfügung. Entschuldigen Sie etwaige Unannehmlichkeiten. 118 |

119 | 120 |
121 | 122 |

Our website is currently undergoing maintenance.

123 | 124 |

125 | We'll be back very soon. Sorry for any inconvenience. 126 |

127 | 128 |
129 |
130 | 131 | 132 | -------------------------------------------------------------------------------- /.platform.app.yaml: -------------------------------------------------------------------------------- 1 | # This file describes an application. You can have multiple applications 2 | # in the same project. 3 | 4 | # The name of this app. Must be unique within a project. 5 | name: app 6 | 7 | # The type of the application to build. 8 | type: php:8.1 9 | build: 10 | flavor: composer 11 | 12 | dependencies: 13 | php: 14 | composer/composer: '^2' 15 | 16 | variables: 17 | env: 18 | # Tell Shopware to always install in production-mode. 19 | APP_ENV: prod 20 | # Instance ID is empty by default, change to something unique in your project 21 | INSTANCE_ID: '' 22 | # Enable HTTP Cache to get cache-control headers 23 | SHOPWARE_HTTP_CACHE_ENABLED: 1 24 | # NVM and Node.js versions to install 25 | NVM_VERSION: v0.39.0 26 | NODE_VERSION: v16.0.0 27 | # Use different redis dbs for cache and sessions 28 | REDIS_CACHE_DATABASE: 0 29 | REDIS_SESSION_DATABASE: 2 30 | 31 | # Improve admin build speed 32 | DISABLE_ADMIN_COMPILATION_TYPECHECK: 1 33 | 34 | # Only build extension. Shopware assets are pre built in the tags 35 | SHOPWARE_ADMIN_BUILD_ONLY_EXTENSIONS: 1 36 | php: 37 | upload_max_filesize: 32M 38 | post_max_size: 32M 39 | memory_limit: 512M 40 | 'assert.active': 0 41 | 'opcache.enable_file_override': 1 42 | 'opcache.interned_strings_buffer': 20 43 | 'opcache.validate_timestamps': 0 44 | 'zend.detect_unicode': 0 45 | realpath_cache_ttl: 3600 46 | 'opcache.memory_consumption': 128M 47 | 'opcache.max_accelerated_files': 20000 48 | 49 | # Specify additional PHP extensions that should be loaded. 50 | runtime: 51 | extensions: 52 | - ctype 53 | - dom 54 | - iconv 55 | - mbstring 56 | - fileinfo 57 | - intl 58 | - redis 59 | - sodium 60 | 61 | # The hooks that will be performed when the package is deployed. 62 | hooks: 63 | build: | 64 | set -e 65 | 66 | # install nvm 67 | unset NPM_CONFIG_PREFIX 68 | export NVM_DIR="$PLATFORM_APP_DIR/.nvm" 69 | # install.sh will automatically install NodeJS based on the presence of $NODE_VERSION 70 | curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$NVM_VERSION/install.sh | bash 71 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 72 | 73 | # have nvm available and load the correct node version in your ssh session 74 | echo 'unset NPM_CONFIG_PREFIX' >> .bash_profile 75 | echo 'export NO_UPDATE_NOTIFIER=1' >> .bash_profile 76 | echo 'export NVM_DIR="$PLATFORM_APP_DIR/.nvm"' >> .bash_profile 77 | echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> .bash_profile 78 | 79 | # Disable UI installer 80 | touch install.lock 81 | 82 | # compile theme and save config for later (will be moved to mount). 83 | # warnings can be ignored (the process is trying to access Redis which is not yet available) 84 | export CI=true 85 | ./bin/build-js.sh 86 | mkdir build-tmp 87 | cp -R files/theme-config build-tmp 88 | 89 | # save plugin config for later (will be moved to mount) 90 | cp var/plugins.json build-plugins.json 91 | 92 | # Remove hashtag to enable fastly 93 | # mv config/packages/fastly.yaml.dist config/packages/fastly.yaml 94 | 95 | deploy: | 96 | set -e 97 | 98 | # load nvm to use the correct node version for any following commands 99 | unset NPM_CONFIG_PREFIX 100 | export NO_UPDATE_NOTIFIER=1 101 | export NVM_DIR="$PLATFORM_APP_DIR/.nvm" 102 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 103 | 104 | # restore theme config from build to mount in case theme needs rebuilding during runtime 105 | cp -R build-tmp/theme-config files/ 106 | 107 | # restore plugin config to mount 108 | cp build-plugins.json var/plugins.json 109 | 110 | # Initialize the Shopware site's data set if it's not already installed. 111 | # (This is only for demo/first install and can be removed once Shopware is initialized) 112 | if [ ! -f $PLATFORM_APP_DIR/installer/installed ]; then 113 | # setup the environment 114 | 115 | # create database with a basic setup (admin user and storefront sales channel). 116 | # this will try to run theme:compile which cannot be disabled, so it will throw a bunch of warnings 117 | # that can be ignored (we use stateless build anyway, so this is done already at this point) 118 | echo "Running system:install (Warnings for theme:compile can be ignored)" 119 | bin/console system:install --create-database --basic-setup --force 120 | bin/console theme:change --all Storefront --no-compile 121 | bin/console theme:dump 122 | 123 | # generate JWT 124 | echo "Running system:generate-jwt-secret" 125 | bin/console system:generate-jwt-secret || true 126 | 127 | # refresh plugins and enable PaaS Plugin 128 | bin/console plugin:refresh 129 | bin/console plugin:install --activate SwagPaas 130 | 131 | # mark system as installed 132 | touch $PLATFORM_APP_DIR/installer/installed 133 | fi; 134 | 135 | if [ "$PLATFORM_ENVIRONMENT_TYPE" != production ]; then 136 | export FRONTEND_URL=`echo $PLATFORM_ROUTES | base64 --decode | jq -r 'to_entries[] | select(.value.id=="shopware") | .key'` 137 | export FRONTEND_DOMAIN=`php -r 'echo parse_url($_SERVER["FRONTEND_URL"], PHP_URL_HOST);'` 138 | bin/console sales-channel:update:domain "$FRONTEND_DOMAIN" 139 | fi 140 | 141 | # optional: run migration automatically with deploy 142 | bin/console database:migrate --all 143 | bin/console cache:clear 144 | 145 | ./setup-fastly.sh 146 | 147 | # The relationships of the application with services or other applications. 148 | # The left-hand side is the name of the relationship as it will be exposed 149 | # to the application in the PLATFORM_RELATIONSHIPS variable. The right-hand 150 | # side is in the form `:`. 151 | relationships: 152 | database: "db:mysql" 153 | rediscache: "cacheredis:redis" 154 | # uncomment if you want to use elasticsearch 155 | # essearch: "searchelastic:elasticsearch" 156 | # uncomment if you want to use rabbitmq 157 | # rabbitmqqueue: "queuerabbit:rabbitmq" 158 | 159 | # The size of the persistent disk of the application (in MB). 160 | disk: 2048 161 | 162 | # The mounts that will be performed when the package is deployed. 163 | mounts: 164 | "/files": 165 | source: local 166 | source_path: "files" 167 | "/public/media": 168 | source: local 169 | source_path: "public/media" 170 | "/public/thumbnail": 171 | source: local 172 | source_path: "public/thumbnail" 173 | "/config/secrets": 174 | source: local 175 | source_path: "config/secrets" 176 | "/config/jwt": 177 | source: local 178 | source_path: "config/jwt" 179 | "/var": 180 | source: local 181 | source_path: "var" 182 | "/installer": 183 | source: local 184 | source_path: "installer" 185 | "/.global": 186 | source: local 187 | source_path: "global" 188 | "/.cache": 189 | source: local 190 | source_path: ".cache" 191 | "/custom/apps": 192 | source: local 193 | source_path: "custom/apps" 194 | "/custom/plugins": 195 | source: local 196 | source_path: "custom/plugins" 197 | 198 | # The configuration of app when it is exposed to the web. 199 | web: 200 | locations: 201 | "/": 202 | # The public directory of the app, relative to its root. 203 | root: "public" 204 | # The front-controller script to send non-static requests to. 205 | passthru: "/index.php" 206 | expires: 24h 207 | rules: 208 | \.(css|js|gif|jpe?g|png|ttf|eot|woff2?|otf|cast|mp4|json|yaml|ico|svg?|cast|mp4|json|yaml|svg?|ttf)$: 209 | expires: 4w 210 | 211 | workers: 212 | queue: 213 | disk: 128 214 | commands: 215 | start: | 216 | bin/console messenger:consume default --memory-limit=$(cat /run/config.json | jq .info.limits.memory)M --time-limit=295 217 | scheduled-task: 218 | disk: 128 219 | commands: 220 | start: | 221 | bin/console scheduled-task:run --memory-limit=$(cat /run/config.json | jq .info.limits.memory)M --time-limit=295 222 | -------------------------------------------------------------------------------- /files/theme-config/6753315de5ae4e9081228ff9d6e7b802.json: -------------------------------------------------------------------------------- 1 | {"themeConfig":{"blocks":{"themeColors":{"label":{"en-GB":"Theme colours","de-DE":"Theme-Farben"}},"typography":{"label":{"en-GB":"Typography","de-DE":"Typografie"}},"eCommerce":{"label":{"en-GB":"E-Commerce","de-DE":"E-Commerce"}},"statusColors":{"label":{"en-GB":"Status messages","de-DE":"Status-Ausgaben"}},"media":{"label":{"en-GB":"Media","de-DE":"Medien"}},"unordered":{"label":{"en-GB":"Misc","de-DE":"Sonstige"}}},"fields":{"sw-color-brand-primary":{"label":{"en-GB":"Primary colour","de-DE":"Prim\u00e4rfarbe"},"type":"color","value":"#008490","editable":true,"block":"themeColors","order":100},"sw-color-brand-secondary":{"label":{"en-GB":"Secondary colour","de-DE":"Sekund\u00e4rfarbe"},"type":"color","value":"#526e7f","editable":true,"block":"themeColors","order":200},"sw-border-color":{"label":{"en-GB":"Border","de-DE":"Rahmen"},"type":"color","value":"#bcc1c7","editable":true,"block":"themeColors","order":300},"sw-background-color":{"label":{"en-GB":"Background","de-DE":"Hintergrund"},"type":"color","value":"#fff","editable":true,"block":"themeColors","order":400},"sw-color-success":{"label":{"en-GB":"Success","de-DE":"Erfolg"},"type":"color","value":"#3cc261","editable":true,"block":"statusColors","order":100},"sw-color-info":{"label":{"en-GB":"Information","de-DE":"Information"},"type":"color","value":"#26b6cf","editable":true,"block":"statusColors","order":200},"sw-color-warning":{"label":{"en-GB":"Notice","de-DE":"Hinweis"},"type":"color","value":"#ffbd5d","editable":true,"block":"statusColors","order":300},"sw-color-danger":{"label":{"en-GB":"Error","de-DE":"Fehler"},"type":"color","value":"#e52427","editable":true,"block":"statusColors","order":400},"sw-font-family-base":{"label":{"en-GB":"Fonttype text","de-DE":"Schriftart Text"},"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","order":100},"sw-text-color":{"label":{"en-GB":"Text colour","de-DE":"Textfarbe"},"type":"color","value":"#4a545b","editable":true,"block":"typography","order":200},"sw-font-family-headline":{"label":{"en-GB":"Fonttype headline","de-DE":"Schriftart \u00dcberschrift"},"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","order":300},"sw-headline-color":{"label":{"en-GB":"Headline colour","de-DE":"\u00dcberschriftfarbe"},"type":"color","value":"#4a545b","editable":true,"block":"typography","order":400},"sw-color-price":{"label":{"en-GB":"Price","de-DE":"Preis"},"type":"color","value":"#4a545b","editable":true,"block":"eCommerce","order":100},"sw-color-buy-button":{"label":{"en-GB":"Buy button","de-DE":"Kaufen-Button"},"type":"color","value":"#008490","editable":true,"block":"eCommerce","order":200},"sw-color-buy-button-text":{"label":{"en-GB":"Buy button text","de-DE":"Kaufen-Button Text"},"type":"color","value":"#fff","editable":true,"block":"eCommerce","order":300},"sw-logo-desktop":{"label":{"en-GB":"Desktop","de-DE":"Desktop"},"helpText":{"en-GB":"Displayed for viewports of above 991px","de-DE":"Wird \u00fcber einem Viewport von 991px angezeigt"},"type":"media","value":"790fc674240a45cbb4dc5dba98920fe8","editable":true,"block":"media","order":100,"fullWidth":true},"sw-logo-tablet":{"label":{"en-GB":"Tablet","de-DE":"Tablet"},"helpText":{"en-GB":"Displayed between a viewport of 767px to 991px","de-DE":"Wird zwischen einem viewport von 767px bis 991px angezeigt"},"type":"media","value":"790fc674240a45cbb4dc5dba98920fe8","editable":true,"block":"media","order":200,"fullWidth":true},"sw-logo-mobile":{"label":{"en-GB":"Mobile","de-DE":"Mobil"},"helpText":{"en-GB":"Displayed up to a viewport of 767px","de-DE":"Wird bis zu einem Viewport von 767px angezeigt"},"type":"media","value":"790fc674240a45cbb4dc5dba98920fe8","editable":true,"block":"media","order":300,"fullWidth":true},"sw-logo-share":{"label":{"en-GB":"App & share icon","de-DE":"App- & Share-Icon"},"type":"media","value":"","editable":true,"block":"media","order":400},"sw-logo-favicon":{"label":{"en-GB":"Favicon","de-DE":"Favicon"},"type":"media","value":"d095060a4539402a9c686948ff307a0b","editable":true,"block":"media","order":500}},"sw-color-brand-primary":{"name":"sw-color-brand-primary","label":{"en-GB":"Primary colour","de-DE":"Prim\u00e4rfarbe"},"helpText":null,"type":"color","value":"#008490","editable":true,"block":"themeColors","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-brand-secondary":{"name":"sw-color-brand-secondary","label":{"en-GB":"Secondary colour","de-DE":"Sekund\u00e4rfarbe"},"helpText":null,"type":"color","value":"#526e7f","editable":true,"block":"themeColors","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-border-color":{"name":"sw-border-color","label":{"en-GB":"Border","de-DE":"Rahmen"},"helpText":null,"type":"color","value":"#bcc1c7","editable":true,"block":"themeColors","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-background-color":{"name":"sw-background-color","label":{"en-GB":"Background","de-DE":"Hintergrund"},"helpText":null,"type":"color","value":"#fff","editable":true,"block":"themeColors","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-success":{"name":"sw-color-success","label":{"en-GB":"Success","de-DE":"Erfolg"},"helpText":null,"type":"color","value":"#3cc261","editable":true,"block":"statusColors","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-info":{"name":"sw-color-info","label":{"en-GB":"Information","de-DE":"Information"},"helpText":null,"type":"color","value":"#26b6cf","editable":true,"block":"statusColors","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-warning":{"name":"sw-color-warning","label":{"en-GB":"Notice","de-DE":"Hinweis"},"helpText":null,"type":"color","value":"#ffbd5d","editable":true,"block":"statusColors","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-danger":{"name":"sw-color-danger","label":{"en-GB":"Error","de-DE":"Fehler"},"helpText":null,"type":"color","value":"#e52427","editable":true,"block":"statusColors","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-font-family-base":{"name":"sw-font-family-base","label":{"en-GB":"Fonttype text","de-DE":"Schriftart Text"},"helpText":null,"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-text-color":{"name":"sw-text-color","label":{"en-GB":"Text colour","de-DE":"Textfarbe"},"helpText":null,"type":"color","value":"#4a545b","editable":true,"block":"typography","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-font-family-headline":{"name":"sw-font-family-headline","label":{"en-GB":"Fonttype headline","de-DE":"Schriftart \u00dcberschrift"},"helpText":null,"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-headline-color":{"name":"sw-headline-color","label":{"en-GB":"Headline colour","de-DE":"\u00dcberschriftfarbe"},"helpText":null,"type":"color","value":"#4a545b","editable":true,"block":"typography","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-price":{"name":"sw-color-price","label":{"en-GB":"Price","de-DE":"Preis"},"helpText":null,"type":"color","value":"#4a545b","editable":true,"block":"eCommerce","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-buy-button":{"name":"sw-color-buy-button","label":{"en-GB":"Buy button","de-DE":"Kaufen-Button"},"helpText":null,"type":"color","value":"#008490","editable":true,"block":"eCommerce","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-buy-button-text":{"name":"sw-color-buy-button-text","label":{"en-GB":"Buy button text","de-DE":"Kaufen-Button Text"},"helpText":null,"type":"color","value":"#fff","editable":true,"block":"eCommerce","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-logo-desktop":{"name":"sw-logo-desktop","label":{"en-GB":"Desktop","de-DE":"Desktop"},"helpText":{"en-GB":"Displayed for viewports of above 991px","de-DE":"Wird \u00fcber einem Viewport von 991px angezeigt"},"type":"media","value":"https:\/\/pr-18-yjncdpi-p272hx6fwtpmm.eu-5.platformsh.site\/\/media\/4b\/7c\/5f\/1622109741\/demostore-logo.png","editable":true,"block":"media","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":true,"extensions":[]},"sw-logo-tablet":{"name":"sw-logo-tablet","label":{"en-GB":"Tablet","de-DE":"Tablet"},"helpText":{"en-GB":"Displayed between a viewport of 767px to 991px","de-DE":"Wird zwischen einem viewport von 767px bis 991px angezeigt"},"type":"media","value":"https:\/\/pr-18-yjncdpi-p272hx6fwtpmm.eu-5.platformsh.site\/\/media\/4b\/7c\/5f\/1622109741\/demostore-logo.png","editable":true,"block":"media","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":true,"extensions":[]},"sw-logo-mobile":{"name":"sw-logo-mobile","label":{"en-GB":"Mobile","de-DE":"Mobil"},"helpText":{"en-GB":"Displayed up to a viewport of 767px","de-DE":"Wird bis zu einem Viewport von 767px angezeigt"},"type":"media","value":"https:\/\/pr-18-yjncdpi-p272hx6fwtpmm.eu-5.platformsh.site\/\/media\/4b\/7c\/5f\/1622109741\/demostore-logo.png","editable":true,"block":"media","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":true,"extensions":[]},"sw-logo-share":{"name":"sw-logo-share","label":{"en-GB":"App & share icon","de-DE":"App- & Share-Icon"},"helpText":null,"type":"media","value":"","editable":true,"block":"media","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-logo-favicon":{"name":"sw-logo-favicon","label":{"en-GB":"Favicon","de-DE":"Favicon"},"helpText":null,"type":"media","value":"https:\/\/pr-18-yjncdpi-p272hx6fwtpmm.eu-5.platformsh.site\/\/media\/ee\/67\/8a\/1622109741\/favicon.png","editable":true,"block":"media","section":null,"tab":null,"order":500,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]}},"technicalName":"Storefront","name":"Shopware default theme","previewMedia":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/assets\/defaultThemePreview.jpg","author":"shopware AG","isTheme":true,"styleFiles":[{"filepath":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/src\/scss\/base.scss","resolveMapping":{"vendor":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/vendor"},"extensions":[]},{"filepath":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/src\/scss\/skin\/shopware\/_base.scss","resolveMapping":{"vendor":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/vendor"},"extensions":[]},{"filepath":"@Plugins","resolveMapping":[],"extensions":[]}],"scriptFiles":[{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/js\/vendor-node.js","resolveMapping":[],"extensions":[]},{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/js\/vendor-shared.js","resolveMapping":[],"extensions":[]},{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/js\/runtime.js","resolveMapping":[],"extensions":[]},{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/storefront\/js\/storefront.js","resolveMapping":[],"extensions":[]},{"filepath":"@Plugins","resolveMapping":[],"extensions":[]}],"storefrontEntryFilepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/src\/main.js","basePath":"vendor\/shopware\/storefront\/Resources","assetPaths":["vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/assets"],"viewInheritance":[],"iconSets":[],"extensions":[]} -------------------------------------------------------------------------------- /files/theme-config/b62af93ffceb42dfa9a73d0973ee102c.json: -------------------------------------------------------------------------------- 1 | {"themeConfig":{"blocks":{"themeColors":{"label":{"en-GB":"Theme colours","de-DE":"Theme-Farben"}},"typography":{"label":{"en-GB":"Typography","de-DE":"Typografie"}},"eCommerce":{"label":{"en-GB":"E-Commerce","de-DE":"E-Commerce"}},"statusColors":{"label":{"en-GB":"Status messages","de-DE":"Status-Ausgaben"}},"media":{"label":{"en-GB":"Media","de-DE":"Medien"}},"unordered":{"label":{"en-GB":"Misc","de-DE":"Sonstige"}}},"fields":{"sw-color-brand-primary":{"label":{"en-GB":"Primary colour","de-DE":"Prim\u00e4rfarbe"},"type":"color","value":"#008490","editable":true,"block":"themeColors","order":100},"sw-color-brand-secondary":{"label":{"en-GB":"Secondary colour","de-DE":"Sekund\u00e4rfarbe"},"type":"color","value":"#526e7f","editable":true,"block":"themeColors","order":200},"sw-border-color":{"label":{"en-GB":"Border","de-DE":"Rahmen"},"type":"color","value":"#bcc1c7","editable":true,"block":"themeColors","order":300},"sw-background-color":{"label":{"en-GB":"Background","de-DE":"Hintergrund"},"type":"color","value":"#fff","editable":true,"block":"themeColors","order":400},"sw-color-success":{"label":{"en-GB":"Success","de-DE":"Erfolg"},"type":"color","value":"#3cc261","editable":true,"block":"statusColors","order":100},"sw-color-info":{"label":{"en-GB":"Information","de-DE":"Information"},"type":"color","value":"#26b6cf","editable":true,"block":"statusColors","order":200},"sw-color-warning":{"label":{"en-GB":"Notice","de-DE":"Hinweis"},"type":"color","value":"#ffbd5d","editable":true,"block":"statusColors","order":300},"sw-color-danger":{"label":{"en-GB":"Error","de-DE":"Fehler"},"type":"color","value":"#e52427","editable":true,"block":"statusColors","order":400},"sw-font-family-base":{"label":{"en-GB":"Fonttype text","de-DE":"Schriftart Text"},"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","order":100},"sw-text-color":{"label":{"en-GB":"Text colour","de-DE":"Textfarbe"},"type":"color","value":"#4a545b","editable":true,"block":"typography","order":200},"sw-font-family-headline":{"label":{"en-GB":"Fonttype headline","de-DE":"Schriftart \u00dcberschrift"},"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","order":300},"sw-headline-color":{"label":{"en-GB":"Headline colour","de-DE":"\u00dcberschriftfarbe"},"type":"color","value":"#4a545b","editable":true,"block":"typography","order":400},"sw-color-price":{"label":{"en-GB":"Price","de-DE":"Preis"},"type":"color","value":"#4a545b","editable":true,"block":"eCommerce","order":100},"sw-color-buy-button":{"label":{"en-GB":"Buy button","de-DE":"Kaufen-Button"},"type":"color","value":"#008490","editable":true,"block":"eCommerce","order":200},"sw-color-buy-button-text":{"label":{"en-GB":"Buy button text","de-DE":"Kaufen-Button Text"},"type":"color","value":"#fff","editable":true,"block":"eCommerce","order":300},"sw-logo-desktop":{"label":{"en-GB":"Desktop","de-DE":"Desktop"},"helpText":{"en-GB":"Displayed for viewports of above 991px","de-DE":"Wird \u00fcber einem Viewport von 991px angezeigt"},"type":"media","value":"8f84dea0dd8046baba36ba2b6b8dbd76","editable":true,"block":"media","order":100,"fullWidth":true},"sw-logo-tablet":{"label":{"en-GB":"Tablet","de-DE":"Tablet"},"helpText":{"en-GB":"Displayed between a viewport of 767px to 991px","de-DE":"Wird zwischen einem viewport von 767px bis 991px angezeigt"},"type":"media","value":"8f84dea0dd8046baba36ba2b6b8dbd76","editable":true,"block":"media","order":200,"fullWidth":true},"sw-logo-mobile":{"label":{"en-GB":"Mobile","de-DE":"Mobil"},"helpText":{"en-GB":"Displayed up to a viewport of 767px","de-DE":"Wird bis zu einem Viewport von 767px angezeigt"},"type":"media","value":"8f84dea0dd8046baba36ba2b6b8dbd76","editable":true,"block":"media","order":300,"fullWidth":true},"sw-logo-share":{"label":{"en-GB":"App & share icon","de-DE":"App- & Share-Icon"},"type":"media","value":"","editable":true,"block":"media","order":400},"sw-logo-favicon":{"label":{"en-GB":"Favicon","de-DE":"Favicon"},"type":"media","value":"71ce62c420c3431fb688cf96cb1873e6","editable":true,"block":"media","order":500}},"sw-color-brand-primary":{"name":"sw-color-brand-primary","label":{"en-GB":"Primary colour","de-DE":"Prim\u00e4rfarbe"},"helpText":null,"type":"color","value":"#008490","editable":true,"block":"themeColors","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-brand-secondary":{"name":"sw-color-brand-secondary","label":{"en-GB":"Secondary colour","de-DE":"Sekund\u00e4rfarbe"},"helpText":null,"type":"color","value":"#526e7f","editable":true,"block":"themeColors","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-border-color":{"name":"sw-border-color","label":{"en-GB":"Border","de-DE":"Rahmen"},"helpText":null,"type":"color","value":"#bcc1c7","editable":true,"block":"themeColors","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-background-color":{"name":"sw-background-color","label":{"en-GB":"Background","de-DE":"Hintergrund"},"helpText":null,"type":"color","value":"#fff","editable":true,"block":"themeColors","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-success":{"name":"sw-color-success","label":{"en-GB":"Success","de-DE":"Erfolg"},"helpText":null,"type":"color","value":"#3cc261","editable":true,"block":"statusColors","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-info":{"name":"sw-color-info","label":{"en-GB":"Information","de-DE":"Information"},"helpText":null,"type":"color","value":"#26b6cf","editable":true,"block":"statusColors","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-warning":{"name":"sw-color-warning","label":{"en-GB":"Notice","de-DE":"Hinweis"},"helpText":null,"type":"color","value":"#ffbd5d","editable":true,"block":"statusColors","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-danger":{"name":"sw-color-danger","label":{"en-GB":"Error","de-DE":"Fehler"},"helpText":null,"type":"color","value":"#e52427","editable":true,"block":"statusColors","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-font-family-base":{"name":"sw-font-family-base","label":{"en-GB":"Fonttype text","de-DE":"Schriftart Text"},"helpText":null,"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-text-color":{"name":"sw-text-color","label":{"en-GB":"Text colour","de-DE":"Textfarbe"},"helpText":null,"type":"color","value":"#4a545b","editable":true,"block":"typography","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-font-family-headline":{"name":"sw-font-family-headline","label":{"en-GB":"Fonttype headline","de-DE":"Schriftart \u00dcberschrift"},"helpText":null,"type":"fontFamily","value":"'Inter', sans-serif","editable":true,"block":"typography","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-headline-color":{"name":"sw-headline-color","label":{"en-GB":"Headline colour","de-DE":"\u00dcberschriftfarbe"},"helpText":null,"type":"color","value":"#4a545b","editable":true,"block":"typography","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-price":{"name":"sw-color-price","label":{"en-GB":"Price","de-DE":"Preis"},"helpText":null,"type":"color","value":"#4a545b","editable":true,"block":"eCommerce","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-buy-button":{"name":"sw-color-buy-button","label":{"en-GB":"Buy button","de-DE":"Kaufen-Button"},"helpText":null,"type":"color","value":"#008490","editable":true,"block":"eCommerce","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-color-buy-button-text":{"name":"sw-color-buy-button-text","label":{"en-GB":"Buy button text","de-DE":"Kaufen-Button Text"},"helpText":null,"type":"color","value":"#fff","editable":true,"block":"eCommerce","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-logo-desktop":{"name":"sw-logo-desktop","label":{"en-GB":"Desktop","de-DE":"Desktop"},"helpText":{"en-GB":"Displayed for viewports of above 991px","de-DE":"Wird \u00fcber einem Viewport von 991px angezeigt"},"type":"media","value":"https:\/\/build-theme-jqadcii-vzo45canxrppm.eu-5.platformsh.site\/\/media\/c3\/ab\/b0\/1634654404\/demostore-logo.png","editable":true,"block":"media","section":null,"tab":null,"order":100,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":true,"extensions":[]},"sw-logo-tablet":{"name":"sw-logo-tablet","label":{"en-GB":"Tablet","de-DE":"Tablet"},"helpText":{"en-GB":"Displayed between a viewport of 767px to 991px","de-DE":"Wird zwischen einem viewport von 767px bis 991px angezeigt"},"type":"media","value":"https:\/\/build-theme-jqadcii-vzo45canxrppm.eu-5.platformsh.site\/\/media\/c3\/ab\/b0\/1634654404\/demostore-logo.png","editable":true,"block":"media","section":null,"tab":null,"order":200,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":true,"extensions":[]},"sw-logo-mobile":{"name":"sw-logo-mobile","label":{"en-GB":"Mobile","de-DE":"Mobil"},"helpText":{"en-GB":"Displayed up to a viewport of 767px","de-DE":"Wird bis zu einem Viewport von 767px angezeigt"},"type":"media","value":"https:\/\/build-theme-jqadcii-vzo45canxrppm.eu-5.platformsh.site\/\/media\/c3\/ab\/b0\/1634654404\/demostore-logo.png","editable":true,"block":"media","section":null,"tab":null,"order":300,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":true,"extensions":[]},"sw-logo-share":{"name":"sw-logo-share","label":{"en-GB":"App & share icon","de-DE":"App- & Share-Icon"},"helpText":null,"type":"media","value":"","editable":true,"block":"media","section":null,"tab":null,"order":400,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]},"sw-logo-favicon":{"name":"sw-logo-favicon","label":{"en-GB":"Favicon","de-DE":"Favicon"},"helpText":null,"type":"media","value":"https:\/\/build-theme-jqadcii-vzo45canxrppm.eu-5.platformsh.site\/\/media\/61\/82\/43\/1634654404\/favicon.png","editable":true,"block":"media","section":null,"tab":null,"order":500,"sectionOrder":null,"blockOrder":null,"tabOrder":null,"custom":null,"scss":null,"fullWidth":null,"extensions":[]}},"technicalName":"Storefront","name":"Shopware default theme","previewMedia":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/assets\/defaultThemePreview.jpg","author":"shopware AG","isTheme":true,"styleFiles":[{"filepath":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/src\/scss\/base.scss","resolveMapping":{"vendor":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/vendor"},"extensions":[]},{"filepath":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/src\/scss\/skin\/shopware\/_base.scss","resolveMapping":{"vendor":"\/app\/vendor\/shopware\/storefront\/Resources\/app\/storefront\/vendor"},"extensions":[]},{"filepath":"@Plugins","resolveMapping":[],"extensions":[]}],"scriptFiles":[{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/js\/vendor-node.js","resolveMapping":[],"extensions":[]},{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/js\/vendor-shared.js","resolveMapping":[],"extensions":[]},{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/js\/runtime.js","resolveMapping":[],"extensions":[]},{"filepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/storefront\/js\/storefront.js","resolveMapping":[],"extensions":[]},{"filepath":"@Plugins","resolveMapping":[],"extensions":[]}],"storefrontEntryFilepath":"vendor\/shopware\/storefront\/Resources\/app\/storefront\/src\/main.js","basePath":"vendor\/shopware\/storefront\/Resources","assetPaths":["vendor\/shopware\/storefront\/Resources\/app\/storefront\/dist\/assets"],"viewInheritance":[],"iconSets":[],"extensions":[]} --------------------------------------------------------------------------------