Upsun User Documentation

Deploy Magento on Upsun

Try Upsun for 15 days
After that, enjoy the same, game-changing Upsun features for less with the First Project Incentive!¹ A monthly $19 perk!
Activate your 15-day trial
¹Terms and conditions apply

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.

Before you begin Anchor to this heading

You need:

  • Git. Git is the primary tool to manage everything your app needs to run. Push commits to deploy changes and control configuration through YAML files. These files describe your infrastructure, making it transparent and version-controlled.
  • A Upsun account. If you don’t already have one, register for a trial account. You can sign up with an email address or an existing GitHub, Bitbucket, or Google account. If you choose one of these accounts, you can set a password for your Upsun account later.
  • The Upsun CLI. This lets you interact with your project from the command line. You can also do most things through the Web Console.

We will be using the Upsun Magento example project for this deployment process. The example specifically features:

  • PHP 8.3
  • MariaDB 10.6
  • Redis 7.2
  • OpenSearch 2
  • RabbitMQ 3.13
  • 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:

applications:
    app:
        # The runtime the application uses.
        type: php:8.3
        # Specify additional PHP extensions that should be loaded.
        runtime:
            extensions:
                - xsl
                - sodium
                - redis
                - blackfire
        variables:
            env:
                NVM_VERSION: master
                NODE_VERSION: 20
                MAGENTO_DC_INDEXER__USE_APPLICATION_LOCK: true
                MAGENTO_INDEXER_BATCH_SIZE__CATALOGINVENTORY_STOCK__SIMPLE: 200
                MAGENTO_INDEXER_BATCH_SIZE__CATALOG_CATEGORY_PRODUCT: 666
                MAGENTO_INDEXER_BATCH_SIZE__CATALOGSEARCH_FULLTEXT__PARTIAL_REINDEX: 100
                MAGENTO_INDEXER_BATCH_SIZE__CATALOGSEARCH_FULLTEXT__MYSQL_GET: 500
                MAGENTO_INDEXER_BATCH_SIZE__CATALOGSEARCH_FULLTEXT__ELASTIC_SAVE: 500
                MAGENTO_INDEXER_BATCH_SIZE__CATALOG_PRODUCT_PRICE__SIMPLE: 200
                MAGENTO_INDEXER_BATCH_SIZE__CATALOG_PRODUCT_PRICE__DEFAULT: 500
                MAGENTO_INDEXER_BATCH_SIZE__CATALOG_PRODUCT_PRICE__CONFIGURABLE: 666
                MAGENTO_INDEXER_BATCH_SIZE__CATALOGPERMISSIONS_CATEGORY: 999
                MAGENTO_INDEXER_BATCH_SIZE__INVENTORY__SIMPLE: 210
                MAGENTO_INDEXER_BATCH_SIZE__INVENTORY__DEFAULT: 510
                MAGENTO_INDEXER_BATCH_SIZE__INVENTORY__CONFIGURABLE: 616
            php:
                memory_limit: "512M"
              ...

Create project Anchor to this heading

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

Configure resources Anchor to this heading

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:

Your magento project in the Upsun console

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.

Configure the resources for your Magento project in the Upsun console

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.

View your log Anchor to this heading

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.

Navigate to the log to see your Magento project being created

Below is a shortened example of what your log would look like:

 Configuring resources
   Setting 'app' resources to 0.5 CPU, 1088MB RAM.
   Setting 'app' disk to 256MB.
   Setting 'db' resources to 0.1 CPU, 448MB RAM.
   Setting 'db' disk to 256MB.
   Setting 'cache' resources to 0.1 CPU, 352MB RAM.
   Setting 'session' resources to 0.1 CPU, 352MB RAM.
   Setting 'session' disk to 256MB.
   Setting 'indexer' resources to 0.1 CPU, 448MB RAM.
   Setting 'indexer' disk to 256MB.
   Setting 'queue' resources to 0.1 CPU, 448MB RAM.
   Setting 'queue' disk to 256MB.
 
 Building application 'app' (runtime type: php:8.3, tree: 392d8f3)
   Generating runtime configuration.
   
   Installing build dependencies...

    ...

   Environment configuration
     app (type: php:8.3, cpu: 0.1, memory: 64, disk: 1024)
     db (type: mariadb:10.6, cpu: 0.1, memory: 448, disk: 256)
     cache (type: redis:7.2, cpu: 0.1, memory: 352)
     session (type: redis-persistent:7.2, cpu: 0.1, memory: 352, disk: 256)
     indexer (type: opensearch:2, cpu: 0.1, memory: 448, disk: 256)
     queue (type: rabbitmq:3.13, cpu: 0.1, memory: 448, disk: 256)
 
   Environment routes
     http://main-bvxea6i-g7baduaayq63y.eu-5.platformsh.site/ redirects to https://main-bvxea6i-g7baduaayq63y.eu-5.platformsh.site/
     http://main-bvxea6i-g7baduaayq63y.eu-5.platformsh.site/static/ redirects to https://main-bvxea6i-g7baduaayq63y.eu-5.platformsh.site/static/
     https://main-bvxea6i-g7baduaayq63y.eu-5.platformsh.site/ is served by application `app`
     https://main-bvxea6i-g7baduaayq63y.eu-5.platformsh.site/static/ is served by application `app`
 

Preview your Magento project Anchor to this heading

Now that your Magento project has been successfully created, you will see the standard Magento layout when you navigate to your preview link:

Your magento project in preview mode

Fetch your Magento project locally Anchor to this heading

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.

Your project ID in console

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 Anchor to this heading

Documentation Anchor to this heading

Authentication Anchor to this heading

Community content Anchor to this heading