---
title: Deploy Sylius with AI on Blossom
url: "/deploy/sylius/"
canonical_url: https://blossom88.com/deploy/sylius/
markdown_url: https://blossom88.com/deploy/sylius.md
summary: Set up an open-source Sylius shop, choose a product size and complete an
  offline test checkout.
categories:
- deployment
- commerce
stack:
- PHP
- Symfony
- Twig
- MySQL
---

# Deploy Sylius with AI on Blossom

[Sylius](https://sylius.com/) is an open-source commerce framework built
on Symfony. Set up one sales channel and try checkout with a product that
comes in two sizes.

## Ask Your Agent

> **Ask your AI agent:** Deploy Sylius on Blossom with managed MySQL. Help me set up a shop and place an order for a sample product variant.
>
> Follow this guide: https://blossom88.com/deploy/sylius/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## How It Runs

| Part | Role | Where |
|---|---|---|
| Sylius Standard storefront and admin | Serve the shop and its built assets with product media on a Volume | Persistent Service with Blossom Account access |
| MySQL | Store the channel, catalog, and orders | Blossom Managed Data |

## Deploy Sylius Standard

Build Sylius Standard with its shop and admin assets. Run it behind
Blossom Account access, link managed MySQL and mount product media.

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use the [Sylius Standard](https://github.com/Sylius/Sylius-Standard/releases/tag/v2.3.1)
skeleton. Apply the tested [Composer manifest](/deploy/recipes/sylius/composer.json),
[Composer lockfile](/deploy/recipes/sylius/composer.lock), and
[Yarn lockfile](/deploy/recipes/sylius/yarn.lock). The Composer files pin
[Sylius core 2.3.3](https://github.com/Sylius/Sylius/releases/tag/v2.3.3).
Install production Composer dependencies, compile the shop and admin
assets with Yarn, and install the Symfony bundle assets before building
the [web image](/deploy/recipes/sylius/Dockerfile).

The Dockerfile uses the prepared app as `locked-source/` in the build
context. Pair it with the [Nginx configuration](/deploy/recipes/sylius/nginx.conf)
and [startup script](/deploy/recipes/sylius/start-sylius.sh) under `recipe/`.
Set a stable `APP_SECRET`, use port 8080 with a TCP health check and mount
the Volume at `/srv/sylius/public/media`.

Link managed MySQL 8.4 as `SYLIUS_MYSQL_URL`. The
[Environment wrapper](/deploy/recipes/sylius/hosted-env.sh) sets the
Symfony database URL and uses the generated HTTPS Service URL as
`DEFAULT_URI`.

</details>

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app_plan:preview --data sylius-plan.yml
    blossom database_instance:create --data sylius-mysql.yml
    blossom app:create --data sylius-app.yml
    blossom environment:create --data sylius-environment.yml
    blossom environment_link:create --data sylius-mysql-link.yml
    blossom env_var:push --environment environment-100 --file sylius.env
    blossom service:create --data sylius-web.yml
    blossom environment:deploy --id environment-100 --follow

</details>

## Set Up Your Sample Shop

Initialize a disposable database and create a private shop owner. Set up a
sales channel with USD, a delivery method, and Cash on Delivery.

> **Ask your AI agent:** Set up one private Sylius sales channel with USD, delivery and Cash on Delivery for the sample shop.

> Follow this guide: https://blossom88.com/deploy/sylius/



<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

Use the [sample fixture](/deploy/recipes/sylius/qualification-fixtures.yaml)
with the wrapper. Pass its base64-encoded contents as
`SYLIUS_FIXTURE_YAML_B64` and set `SYLIUS_QA_ADMIN_PASSWORD` as a protected
variable. Apply Doctrine migrations and load `blossom_qualification` once
in the empty demo database. The product photo comes from the
[Sylius demo fixtures](https://github.com/Sylius/Sylius/blob/v2.3.3/src/Sylius/Bundle/CoreBundle/Resources/fixtures/t-shirts/woman/t-shirt_01_1.webp).

</details>

## Order the Medium Workshop Tee

Open **Harbor Workshop Tee**, select **Medium**, and place one sample
Cash on Delivery order. Open the same order in the Sylius admin area
and check the size on its line item.

![Choose a size for the workshop tee.](/deploy/assets/images/sylius/sylius-workshop-tee.webp)

> **Ask your AI agent:** Place a Cash on Delivery order for one Medium workshop tee and open the order in the admin area.

> Follow this guide: https://blossom88.com/deploy/sylius/



## Keep It Running

![Reopen the order for the Medium variant.](/deploy/assets/images/sylius/sylius-medium-order.webp)


Replace the demo Container with the same MySQL Link and Volume. Sign in
again and reopen the original order and the product in the storefront.

> **Ask your AI agent:** Replace the Sylius demo Container, then reopen the Medium order and check that the product photo still loads.

> Follow this guide: https://blossom88.com/deploy/sylius/



<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom service:scale --id service-100 --desired-size 0 --follow
    blossom service:scale --id service-100 --desired-size 1 --follow
    blossom container:list --service service-100

</details>

## What You Get

- A private Sylius storefront and admin area
- A sales channel with a currency, delivery and an offline payment method
- A test order for a specific product size
- An order and product image you can reopen after an update

Tested on Blossom: After Container replacement, a fresh admin session reopened the original Medium order and the product photo matched byte for byte.
