We’re here to shed a little light on how you can host and configure your multiple application projects on Upsun with this step-by-step guide. The goal is to enable your team to focus more on creating incredible user experiences and less on multi-application infrastructure management—as well as a few multi-application development tips along the way.
We’re going to look at this through the lens of a customer looking for multi-application hosting with a few specific constraints. These constraints are:
To be able to perform the following steps in this process, you first need to create your own repository—a Fork—using an Upsun example. To do so, simply follow the steps in this Github article to create a fork from our BigFoot multi-app project to your own Github organization. This Bigfoot multi-app project has a backend using API Platform, a frontend+API using Symfony, a white label frontend using Gatsby, and a Mercure Rocks server.
After creating your fork, clone it locally and open it in your favorite integrated development environment (IDE).
git clone https://github.com/<YourOrgName>/upsun_multi-app-example bigfoot-multiapp
cd bigfoot-multiappThen remember to replace the <YourOrgName> value with your own Github organization.
To host your multi-application project on Upsun, a YAML configuration— config.yaml—is needed in your source code to manage the way your application behaves. This YAML configuration file is located in a .upsun/ folder, at the root of your source code, the architecture of which will look like this:
bigfoot-multiapp
├── .upsun
│ └── config.yaml
└── <project sources>To configure your multi-application project, there are a few basic rules:
Upsun YAML configuration is located in the .upsun/ folder and can be automatically populated using the upsun project:init command, see below:
├── .upsun
│ └── config.yaml
└── <project sources>This command generated a .upsun/config.yaml file, based on your local stack, and it contains 3 top-level YAML keys:
applications: this contains the list of your application definitionservices: this contains the list of your service definitionroutes: this contains the list of your route definitionTo configure your project, you first need to create a new .upsun/config.yaml file with the following first top-level YAML keys:
# .upsun/config.yaml
applications:
services:
routes:
Then commit your newly configured file:
git add .upsun/config.yaml
git commit -m "init Upsun configuration"
git push
Now, let’s configure our four applications one by one:
First, we need to configure the applications