Applications
Shopware PaaS Native supports multiple applications within a project, such as environments for production, staging, or temporary feature testing.
Each application has its own compute resources, infrastructure, and deployment configuration, so you can tailor each environment to its specific needs.
For instance, you might allocate smaller, hibernating compute instances for staging while reserving larger, always-on resources for production.
The number of projects and applications available to an organization depends on the booked plan.
Default resource profile and scaling
Applications are provisioned with a default resource profile for the main Shopware workloads:
| Component | Default replicas | CPU request | Memory request | Memory limit |
|---|---|---|---|---|
storefront | 2 | 50m | 256Mi | 2Gi |
admin | 1 | 25m | 128Mi | 2Gi |
worker | 1 | 50m | 256Mi | 1Gi |
Horizontal scaling is the primary scaling mechanism in Shopware PaaS Native.
Resource limits above the default profile depend on the booked plan, with some flexibility for scaling within that scope.
Creating an Application
Create a new application to a project:
sw-paas application createBuild your application
To trigger a new build for the application via CLI, use the following command:
sw-paas application build startThis command initiates the build process, packaging your application and preparing it for deployment. While the build is running, you can monitor its progress and view real-time output by following the logs:
sw-paas application build logsBuilds run as regular Docker builds. External network requests are allowed during the build when your project requires them, for example to reach configured Composer repositories or other external package sources.
If your build needs credentials or other sensitive values, provide them through Vault secrets using buildenv or by using BUILD-scoped environment variables where appropriate.
Update your application
To update your application, you need to run the following command and provide the commit SHA:
sw-paas application updateThis command initiates the build process, waits until it's done, and runs the deployment for you.
Deployment behavior
Deployments are designed to be zero downtime and use Kubernetes rolling updates.
During deployment, database migrations run first. After that, the remaining deployment flow is handled by the deployment helper.
This works well for regular Shopware deployments because breaking database changes are expected only during major Shopware upgrades. When upgrading across major versions, make sure your deployment remains backward compatible throughout the rollout.
Pre-deployment and post-deployment hooks are supported through the deployment helper configuration.
Automated deployments from CI/CD are supported. The CLI can run in non-interactive mode and supports machine-to-machine authentication with tokens.
Deploy a specific build of your application
To create a deployment with a specific build, use the following command:
sw-paas application deploy createIt will let you choose which build you want to deploy. This is very handy, since you can choose any successful build to deploy: the latest one to bring your change live, or a previous one to fix an issue that arose.
Deployments management
To list all past deployments:
sw-paas application deploy listTo get details about a given deployment:
sw-paas application deploy getPlugin Management
Plugin management is done via Composer because the platform runs in a high-availability and clustered environment.
In such setups, local changes aren't feasible, as all instances must remain identical and stateless. This ensures consistency across all deployments.
Using Privately Hosted Packages
To pull privately hosted Composer packages, you need to provide authentication credentials. Create a COMPOSER_AUTH secret using the CLI:
sw-paas vault createFollow the prompts to enter your Composer authentication JSON as a buildenv. This secret will be used during builds to access private repositories.
Executing Commands
Shopware PaaS Native provides two primary ways to run commands in your application environments via CLI: exec and command.
exec Command
The exec command allows you to execute commands in a remote terminal session for your applications. This is useful for running commands directly on your application's environment, such as debugging, maintenance, or running one-off commands interactively.
sw-paas exec --newThis opens an interactive shell session inside your application's container.
Note
Please check the known issues regarding network considerations when running this command.
command Command
The command command lets you create and manage commands that are executed in dedicated containers. This is particularly useful for CI/CD environments, asynchronous command execution, automated processes, or situations where you don't need to wait for command completion.
Unlike exec, which provides an interactive shell, command runs your specified command in a new, isolated container and does not require you to wait for its completion.
The default execution directory is /var/www/html and the container has a time-to-live (TTL) of 1 hour, so your command must complete within that timeframe.
sw-paas command createFor a complete list of available commands, refer to the Shopware console commands documentation.
Domain Management
Shopware Domain
When you deploy an application for the first time, it automatically receives a complimentary shopware.shop domain. This allows you to access and test your application right away, even before setting up a custom domain.
The assigned domain is generated based on your application's name and unique identifier.
Custom Domain
You can configure custom domains for your applications using the sw-paas CLI domain command. This allows you to attach multiple domains to a single application and route traffic through the Fastly CDN for optimal performance.
Creating Custom Domains
To create a custom domain for your application:
sw-paas domain createFollow the prompts to specify your domain name and application. You can attach multiple domains to a single application.
DNS Configuration
After creating a custom domain, you must configure your DNS settings to point to the PaaS CDN endpoint:
Configure your custom domain's DNS to point to:
cdn.shopware.shopThis configuration ensures that all traffic to your custom domain is routed through the Fastly CDN for optimal performance and caching.
Application Deployment
Following domain creation, you must redeploy your application. You can do it by using:
sw-paas application deploy createShopware Configuration
Subsequently, you can configure the domain within Shopware and associate it with a storefront. Status update functionality is currently under development and should be considered a beta feature.
For more detailed information about CDN configuration and best practices, refer to the CDN documentation.