Repository
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 fork of the shopware/paas setup template from GitHub. You will find out 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 Enterprise Cloud. More information in Source Integrations.

Fork and clone setup template

First of all create a new fork of the shopware/paas setup template.
Screenshot of the fork button on GitHub
In the next step, clone it to your local machine (the following commands require git command line tools):
1
git clone <path-to-your-fork> shopware-cloud-project
Copied!
This will create a local copy of the forked repository in a directory named shopware-cloud-project.

Add an upstream remote

Have a look at the remotes using git remote -v. By default, your repository is configured with a remote named origin which points to your forked repository. However, we also want to ensure you can receive updates whenever Shopware makes changes to the setup repository. Hence, we configure a so-called upstream remote:
1
git remote add upstream https://github.com/shopware/paas
Copied!
If you run git remote -v again, you will see that there's a new remote named upstream. From now on, you can always pull the latest changes from the official template using
1
git fetch upstream
2
git checkout main # Assuming your default branch is called "main"
3
git merge upstream/main
Copied!
Be aware that you might have to resolve some conflicts if you made changes in your template.

Add Enterprise Cloud remote

Next, we need to add a third remote, which allows us to push code towards the Enterprise Cloud environment and trigger a deployment.
We first need the project ID, so we display all projects using
1
$ shopware projects
2
3
Your projects are:
4
+---------------+-----------------------+------------------+--------------+
5
| ID | Title | Region | Organization |
6
+---------------+-----------------------+------------------+--------------+
7
| 7xasjkyld189e | enterprise-cloud-env | <region-domain> | shopware |
8
+---------------+-----------------------+------------------+--------------+
9
10
Get a project by running: platform get [id]
11
List a projects environments by running: platform environments -p [id]
Copied!
To add the project remote to your local repository, just run
1
shopware project:set-remote 7xasjkyld189e # Replace with your project ID
Copied!

Conclusion

Now your repository is configured - you should have three remotes
1
$ git remote -v
2
3
origin [email protected]:<project-repository>.git (fetch)
4
origin [email protected]:<project-repository>.git (push)
5
platform <enterprise-cloud-url>.git (fetch)
6
platform <enterprise-cloud-url>.git (push)
7
upstream https://github.com/shopware/paas (fetch)
8
upstream https://github.com/shopware/paas (push)
Copied!
Remote
Function
Description
origin
Project Code
This remote contains all your project specific source code
platform
Enterprise Cloud Environment
Changes pushed to this remote will be synced with your Enterprise Cloud environment
upstream
Official Template
Maintained by Showpare and used to pull latest changes