---
title: Core Concepts of PaaS Deployment | Shopware Community Hub
description: >-
  Learn the fundamental technical concepts behind PaaS deployments, including
  git-based workflows, environment orchestration, and infrastructure as code.
canonical_url: 'https://hub.shopware.com/learn/unit/paas-core-concepts'
---

# Core Concepts of PaaS Deployment

<LearningObjectives>

- Understand git-based deployment workflows and their advantages.
- Explore environment orchestration and service management in PaaS platforms.
- Learn about immutable infrastructure and infrastructure-as-code principles.

</LearningObjectives>

# Core Concepts of PaaS Deployment

In this learning unit, we'll explore the technical innovations that make PaaS so powerful: Git-based deployment workflows, environment orchestration, and the principles of immutable infrastructure and infrastructure as code.

## Git-Based Deployment

Most PaaS platforms for Shopware use Git for deployments, replacing manual FTP/SSH approaches.

### How Git-Based Deployment Works

1. Your code lives in a Git repository.
2. The PaaS platform connects to this repository (or a copy of it).
3. Pushing changes to a specific branch triggers a deployment.
4. The platform builds your application from that branch.
5. After a successful build, the new version is deployed.

<Callout title="Practical Example" type="info">

The official documentation shows a complete [deployment workflow](https://developer.shopware.com/docs/products/paas/shopware-paas/#getting-started-with-shopware-paas-how-to-deploy-your-first-project), from creating a Shopware project with `composer create-project shopware/production demo` to pushing code with `git push platform main`.

</Callout>

<Callout title="Key Point" type="info">

Your Git repository is the **single source of truth**. This ensures consistency between environments and provides a clear history of changes.

</Callout>

### Key Benefits of Git-Based Deployment

- **Version Control**: Every deployment is tied to a specific commit.
- **Auditability**: Full change history.
- **Rollback Capability**: Easy reversion to previous versions.
- **Branch-Based Workflows**: Different branches can deploy to different environments.
- **Deploy Preview**: Feature branches can deploy to temporary environments.
- **Infrastructure as Code**: Configuration stored in Git.

### PaaS-Specific Git Extensions

Most PaaS providers extend Git with platform-specific capabilities:

- **Platform Configuration Files**: Define services, routes, and build processes.
- **Deploy Hooks**: Run scripts during a deployment process.
- **Environment Variables**: Configuration per environment.
- **Build Cache**: Faster builds via caching.

## Environments & Service Orchestration

PaaS platforms excel at managing multiple environments and the services they require.

### Environment Types and Purposes

- **Development**: Active work, debugging.
- **Staging/QA**: Pre-production testing.
- **Production**: The live environment.
- **Feature Environments**: Temporary environments for testing specific features.

### Service Orchestration

PaaS platforms automatically provision and configure the services your application needs:

- **Databases**: MySQL, MariaDB, PostgreSQL
- **Caching**: Redis, Memcached
- **Search**: Elasticsearch, Meilisearch
- **Queuing**: RabbitMQ, SQS
- **Storage**: Object storage for media files

These services are typically:

1. **Containerized**: Each service runs in its own isolated container.
2. **Networked**: Services can communicate securely within the platform.
3. **Managed**: The platform handles updates, backups, and monitoring.
4. **Scalable**: Services can be resized as needed.

### Environment Variables and Configuration

PaaS platforms use environment variables to configure:

- Database connections
- API credentials
- Feature flags
- Environment-specific settings
- Secrets and sensitive information

<Callout title="Best Practice" type="info">

Never hard-code environment-specific configurations. Instead, use environment variables and override per environment.

</Callout>

### Multi-Environment Workflows

PaaS enables sophisticated workflows:

- **Continuous Integration**: Automated testing on every push.
- **Continuous Deployment**: Automatic deployment to dev or staging.
- **Pull Request Previews**: Temporary environments for reviewing changes.
- **Blue/Green Deployments**: Zero-downtime deployments to production.
- **A/B Testing**: Running multiple versions simultaneously.

## Immutable Infrastructure and Infrastructure as Code

PaaS uses **immutable deployments** and **infrastructure as code**.

### Immutable Infrastructure

- Each deployment creates a **new, immutable instance**.
- Build from scratch each time.
- Once deployed, the environment doesn't change until the next deployment.
- Updates are done by building and deploying a completely new instance.

Benefits of immutable infrastructure:

- **Consistency**: Every deployment starts from a clean state.
- **Reproducibility**: Environments can be rebuilt identically.
- **Predictability**: No configuration drifts over time.
- **Rollback**: Easy return to previous states.
- **Scalability**: New instances can be added without affecting others.

### Infrastructure as Code (IaC)

Infrastructure as Code means defining your infrastructure requirements in code rather than manually configuring servers:

- **Platform Configuration Files**: Define services, routes, hooks, and more.
- **Build and Deploy Scripts**: Automate the build and deployment process.
- **Service Definitions**: Specify the size and configuration of services.
- **Network Rules**: Define how services communicate.

These configuration files live in your Git repository alongside your application code, providing:

- **Version Control**: Track changes to infrastructure over time.
- **Code Review**: Review infrastructure changes like any code change.
- **Consistency**: Apply the same configuration across environments.
- **Automation**: Automate provisioning and configuration.
- **Documentation**: Self-documenting infrastructure requirements.

### Examples of Platform Configuration Files

Different PaaS providers use different configuration formats:

**Shopware PaaS** uses `.platform/applications.yaml` and `.platform/services.yaml`:

```yaml
# .platform.app.yaml example
name: app
type: php:8.1
relationships:
    database: "mysql:mysql"
    redis: "redis:redis"

web:
    locations:
        "/":
            root: "public"
            index:
                - index.php
            
hooks:
    build: |
        set -e
        composer install --no-dev --optimize-autoloader
        bin/console assets:install --no-debug
        
disk: 2048
```

<Callout title="Platform Configuration" type="info">

See [Shopware PaaS step-by-step guide](https://developer.shopware.com/docs/products/paas/shopware-paas/#getting-started-with-shopware-paas-how-to-deploy-your-first-project) for detailed configuration.

</Callout>

**Symfony Cloud** uses a similar approach with `.symfony.cloud.yaml` and `.symfony/services.yaml`.

**AWS Elastic Beanstalk** uses various configuration files in a `.ebextensions` directory.

<Callout title="Key Point" type="info">

While specific syntax varies between platforms, the core principles remain the same: defining infrastructure requirements declaratively in code that lives alongside your application.

</Callout>

## How These Concepts Transform Shopware Deployment

These PaaS concepts fundamentally change how we approach Shopware deployments:

### Traditional vs PaaS-based Deployment

| Aspect                    | Traditional                                                   | PaaS-based                                |
|---------------------------|---------------------------------------------------------------|-------------------------------------------|
| **Environment setup**     | Manual server provisioning                                    | Automated environment provisioning        |
| **Deployment**            | SSH access for configuration and updates, FTP or Git for Code | Git-driven deployments                    |
| **Configuration**         | Environment-specific configuration in files                   | Declarative service configuration         |
| **Database**              | Manual database migrations                                    | Automated database migrations             |
| **Scaling**               | Manual scaling and service provisioning                       | API-driven scaling and service management |
| **Backups**               | Manual backup and restore processes                           | Automated backup processes                |
| **Infrastructure**        | Mutable, long-lived servers                                   | Immutable infrastructure for consistency  |

## Technical Requirements for PaaS-Ready Shopware Projects

To work effectively on PaaS platforms, Shopware projects need to follow certain principles:

1. **Environment Awareness**: Adapt to environment (dev, staging, prod).
2. **Configuration via Environment Variables**: Don't hardcode configuration.
3. **Stateless Application Tier**: Store state in services, not in the application filesystem.
4. **Managed Asset Storage**: Use object storage for media files.
5. **Database Migration Automation**: Automate schema updates.
6. **Build Process Automation**: Automate build processes.
7. **Health Checks**: Provide health checks.

## Key Takeaways

- **Git-Driven Workflow**: Git becomes your deployment mechanism, not just version control.
- **Environment Proliferation**: Multiple environments are easy to manage.
- **Configuration as Code**: Infrastructure and application configuration live together in code.
- **Immutable Deployments**: Each deployment creates a fresh, immutable application instance.
- **Service Orchestration**: Services are managed by the platform.
- **Automation First**: Automation replaces manual operations.

<Callout title="Complete Documentation" type="info">

For all technical details (CLI, config, troubleshooting), see the [Shopware PaaS documentation](https://developer.shopware.com/docs/products/paas/shopware-paas/#getting-started-with-shopware-paas-how-to-deploy-your-first-project).

</Callout>

Congratulations! You've now completed the foundational course on Shopware PaaS.

## Next Steps

In the next course, **Planning & Bootstrapping PaaS Projects**, you'll put this knowledge into practice. You'll learn how to set up your development environment, configure repositories, design environment strategies, and ensure your projects are deployment-ready.
