The source code of your project will reside in a git-based VCS repository. You can start with a plain project. However, we suggest starting with a new Composer create-project. You will learn more about the setup template in the Setup Template section.
This guide explains the repository setup using GitHub. You can also integrate Bitbucket or GitLab-based version control environments with Shopware PaaS. Refer to Source Integrations for more information.
Create a Shopware project
Firstly, create a new project with
composer create-project shopware/production <folder-name> using the Symfony Flex template.
This will create a brand new Shopware 6 project in the given folder. Now, change it into the newly created project and require the PaaS configuration with
composer req paas.
Secondly, create a new Git repository and push it to your favourite Git hosting service.
Updating the PaaS template recipe
You can update the recipe to the latest version using the
composer recipes:update command.
However, the template may receive breaking changes. For example, when making certain changes to file mounts (like using a "service mount" instead of a "local mount"), there is no way to migrate your existing data into the updated mount automatically. Due to this, we always recommend manually checking all changes in the
recipes:update command provided for the PaaS package, as some updates to the
.platform-yaml files might need extra manual actions. Every PaaS recipe update should be deemed a breaking update and thus be validated before applying it to your project.
Add PaaS remote
Lastly, add a second remote, which allows us to push code towards the PaaS environment and trigger a deployment.
We first need the project ID, so we display all projects using
$ shopware projects Your projects are: +---------------+-----------+------------------+--------------+ | ID | Title | Region | Organization | +---------------+-----------+------------------+--------------+ | 7xasjkyld189e | paas-env | <region-domain> | shopware | +---------------+-----------+------------------+--------------+ Get a project by running: platform get [id] List a projects environments by running: platform environments -p [id]
To add the project remote to your local repository, just run
shopware project:set-remote 7xasjkyld189e # Replace with your project ID
Now your repository is configured - you should have three remotes
$ git remote -v origin firstname.lastname@example.org:<project-repository>.git (fetch) origin email@example.com:<project-repository>.git (push) platform <paas-url>.git (fetch) platform <paas-url>.git (push)
|Project Code||This remote contains all your project specific source code|
|PaaS Environment||Changes pushed to this remote will be synced with your PaaS environment|
Migrating from the old template to the new template
The following tasks have to be done additionally to the flex migration:
- The root
.platform.app.ymlhas been moved to
- The following services has been renamed:
As the services are renamed, a completely new service will be created. Here are three possible options available:
- Rename the services back again
- Start with a new service and re-index Elasticsearch
- Perform the transitional upgrade of two services in parallel for some time