Setup Template
The setup template is a derivation from the shopware/production template. It contains build and deployment logic for Shopware PaaS as well as configuration for the underlying infrastructure and services. In this chapter we will have a look at these customizations.
Below is a directory overview of the PaaS setup template.
├─ .platform/
│ ├─ routes.yaml
│ ├─ services.yaml
├─ bin/
├─ config/
├─ custom/
├─ files/
│ ├─ theme-config/
├─ src/
This file contains Shopware PaaS specific configuration and can be customized as needed for your individual project.


Is the name of your app. It's used in commands like
shopware ssh -A app 'bin/console theme:dump'
Unless there's specific need for it, leave it as app.


The base image used for your build process.


This section contains configuration for environment variables or server settings. General store settings and configuration are set here. In this place you can inject custom environment variables or enable feature flags.
Variables in the env section are automatically injected as environment variables.


Lifecycle hooks are custom scripts that are called during your build and deploy processes. See more on the deployment process.

build hook

This script is called during the build process and builds your applications assets and disables the UI installer. You can customize this script if you need. During the execution, you may perform write operations on the file system, which are prohibited in the proceeding steps - unless the corresponding directory is mounted.
You do not have access to any of the services configured, as the application is not running yet. You should ensure, to perform as much of your entire building procedure during the build step, as web traffic is blocked during the execution of the deploy step.

deploy hook

The environment will be cut off from web traffic during the execution of the deploy hook. The shorter this script is, the shorter the downtime will be.
This script is called during the deployment process. Theme configuration is copied, the install scripts are executed and secrets are generated
  • Copy theme configuration
  • Run database migrations
  • Clear cache
If this is the first deployment, the following operations are performed
  • Setup script is executed
  • Theme is set
  • Secrets are generated
  • installer/installed file is created
You can also customize this script, however make sure to keep operations to a minimum, as your store will not be exposed to web traffic during the execution. Connections made during the meantime will be queued in a suspended state and not necessarily fail, but take longer than usual (i.e. until the deployment has finished).


Analogous to the two preceeding hooks, the post_deploy hook provides an entry point for custom scripts. However, this hook is executed after the application container is accepting connections.


This section defines the mapping between services created in the services.yaml and the application itself.


By default, the entire storage of your application is read-only. All directories listed here are exempt from this policy.


The public root of your application public/index.php is configured, so the server knows where to route dynamic requests.


Workers are copies of your application instance after the build hook has been executed. The are usually configured with a start command. By default there are two configured workers - one for message queues and one for scheduled tasks.
This file configures, that incoming http requests are routed to the app instance.
This file contains services which are used by the app instances. Depending on your setup, uncomment or add services that you need and they will be created and scaled automatically.

config /

The config directory contains all applications specific configuration. See more on configurations in our Infrastructure and Performance sections.
Some prominent configurations which have been altered:
Redis is configured as default for session
Redis adapter is set as a app cache
Disables the admin worker, because there are dedicated workers
Disables the auto updater
We suggest checking in your theme configuration to version control in this directory. Read more on the concept of builds without database as described in Theme Build.
Copy link
Edit on GitHub
On this page
.platform / routes.yaml
.platform / services.yaml
config /
files / theme-config