Before attempting to deploy Magento on Upsun, you must complete the Getting started guide.
You can also check out the Upsun demo app and Resource configuration guide. These provide all of the core concepts and common commands you need to easily follow this Magento guide.
We will be using the Upsun Magento example project for this deployment process. The example specifically features:
- PHP
- MariaDB
- Redis
- OpenSearch
- RabbitMQ
- Automatic TLS certificates
- Composer-based build
The example also features an Upsun config.yaml file. Below is a shortened example of the config.yaml file:
Create project
Copy and run the following command in command line:
upsun project:create --init-repo https://github.com/platformsh-templates/magentoCE24/
You will then have to make the following selections:
- Select an organization to create the project under
- Select a title for your project
- Select a region to deploy from
- Select your default branch
- Select whether you would like to set your new project as the remote for any existing repositories that have been detected under your organization
Once you have made your selections, the Upsun bot will activate your project.
When your project is created, you will be provided with the following details to access it:
Region
Project ID
Project title
Project URL
Git URL
Copy the Project URL into your browser. You should see your newly created project in the Upsun console. For example, if you had named your Magento project Mage, you would see something similar to the screenshot below:
You will be prompted to configure your resources. At this stage you can select the CPU, RAM, instances and disk size for your Magento project.
Recommended configurations
You will see that the container_profile for the app container is using the BALANCED profile by default. The standard CPU & RAM recommendation for your app container is a minimum of 0.5 CPU, 1088MB RAM. Please see the table below for all recommended minimum settings for your app container:
| CPU & RAM | Instances | Disk/storage |
|---|
0.5 CPU, 1088MB RAM | No minimum | 256MB |
All other services will be using their default container profiles and therefore can be set to 0.1 CPU, so the above values only apply as recommended minimums for your app container.
Once your project is deployed, you may need to adjust your resources and adjust the container profiles of your other services.
Note
Please note that the deployment after configuring resources may take up to 25 minutes.
View your log
Now that your resources have been configured, you can view a log of how Upsun creates your project. In the recents section, click the three dots to the right of the activity about your updated resource allocation on Main.
Below is a shortened example of what your log would look like:
Preview your Magento project
Now that your Magento project has been successfully created, you will see the standard Magento layout when you navigate to your preview link:
Fetch your Magento project locally
First, get your project ID by clicking the three dots in the upper right hand of your console, next to the settings cog wheel. Your project ID will appear in a drop down menu.
Copy the following command into your command line.
upsun get <projectid>
Make sure to replace <projectid> with the Project ID you just copied from console. Once you run the command in command line, you will be asked if you want to set the remote project for any existing repositories to your project. You will also need to specify a directory for your project to be stored in when downloaded.
Once your project has successfully downloaded, you will be able to access it locally by navigating to the directory you chose.
Further resources
Documentation
Authentication