---
title: Deploy Vendure with AI on Blossom
url: "/deploy/vendure/"
canonical_url: https://blossom88.com/deploy/vendure/
markdown_url: https://blossom88.com/deploy/vendure.md
summary: Run Vendure and its worker with managed PostgreSQL, then place and ship a
  sample order.
categories:
- deployment
- commerce
stack:
- TypeScript
- NestJS
- React
- PostgreSQL
---

# Deploy Vendure with AI on Blossom

[Vendure](https://vendure.io/) is a TypeScript commerce framework with a
GraphQL Shop API and a Dashboard for your catalog and orders. Start with
one product and a test shipment.

## Ask Your Agent

> **Ask your AI agent:** Deploy Vendure on Blossom with managed PostgreSQL. Help me list a product and ship a test order.
>
> Follow this guide: https://blossom88.com/deploy/vendure/

[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 |
|---|---|---|
| Vendure server and Dashboard | Serve the Admin and Shop APIs and manage products and orders | Web Service with Blossom Account access |
| Vendure worker | Process background jobs such as catalog indexing | Private Service |
| PostgreSQL | Store products, orders, and queued jobs | Blossom Managed Data |

## Deploy Vendure and Its Worker

Generate a PostgreSQL project with Vendure's CLI. Build the server,
worker and Dashboard in one image. Deploy a web Service and a private
worker Service from that image, with the same managed PostgreSQL link.

<details class="optional-reading" markdown="1">
<summary>Build and migration settings</summary>

Generate the [initial migration](https://docs.vendure.io/current/framework/developer-guide/migrations)
against a disposable PostgreSQL database. This run used
[Vendure 3.8.2](https://github.com/vendurehq/vendure/releases/tag/v3.8.2).
Keep TypeORM synchronization off. Set `dbConnectionOptions.url` to
`process.env.DATABASE_URL` and remove the scaffold's separate database
credentials. Copy the [migration entrypoint](/deploy/recipes/vendure/migrate.ts)
to `src/migrate.ts` and run `node dist/migrate.js` in the Release Phase.
Start the server without rerunning migrations.

Build the Dashboard for production so it uses the same host as the Admin
API. Keep a stable `COOKIE_SECRET` and set `SUPERADMIN_USERNAME` and
`SUPERADMIN_PASSWORD` as protected Environment variables. Use Vendure's
default database job queue for this recipe.

The [Dockerfile](/deploy/recipes/vendure/Dockerfile.launcher) shows how
to build the project and copy its email templates into the image. The
recipe exercises catalog data and orders. Configure shared asset
storage before uploading product media you want to retain across updates.

</details>

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

    blossom app_plan:preview --data vendure-plan.yml
    blossom environment_link:create --data vendure-postgres-link.yml
    blossom service:create --data vendure-web.yml
    blossom service:create --data vendure-worker.yml
    blossom environment:deploy_hooks:update --id environment-100 --data vendure-deploy-hooks.yml
    blossom environment:deploy --id environment-100 --follow

</details>

## Create a Product and Ship a Test Order

Create a shipping method and add one product to your catalog. Use
Vendure's [test payment handler](https://docs.vendure.io/current/framework/storefront/checkout-flow)
for a checkout in this private Environment. Open the result in Dashboard,
add a manual fulfillment with a sample tracking code, and mark it Shipped.

![Find the sample notebook in Vendure.](/deploy/assets/images/vendure/vendure-trail-notebook.webp)

> **Ask your AI agent:** Create a sample product in Vendure, place a test order with simulated payment, and mark it shipped.

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



## Reopen the Shipment After Replacing Vendure

Replace the web and worker Containers with the same PostgreSQL connection.
Sign in again and reopen the order. Ask the worker to reindex the catalog
and check that the new job finishes.

![Reopen the shipped order after replacing both Containers.](/deploy/assets/images/vendure/vendure-sample-shipment.webp)


> **Ask your AI agent:** Replace Vendure’s server and worker Containers, then reopen the same shipment and check that a new catalog reindex finishes.

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



## What You Get

- A private Vendure Dashboard and Shop API
- A sample product, a simulated checkout, and a shipment in the order history
- A worker that keeps processing jobs after Container replacement

Tested on Blossom: The shipped order and original tracking code survived replacing the server and worker. A new catalog reindex completed.
