This is a demo project which demoes how to create a multivendor marketplace demo using Medusa 2.0
Detailed article on Medium https://medium.com/@igorkhomenko/building-a-multivendor-marketplace-with-medusa-js-2-0-a-dev-guide-f55aec971126
If you want to run both PostgreSQL and Medusa in one command, use the following command that combines both the main docker-compose.yml
file and the docker-compose.medusa.yml
file:
docker compose -f docker-compose.yml -f docker-compose.medusa.yml up --build
This command will build and start both PostgreSQL and Medusa containers.
Important: You can only run this command after PostgreSQL
has already been started using the docker compose up command from Option 2 (below). This is because PostgreSQL creates a network that Medusa depends on to run properly.
- Run PostgreSQL
By default, running the following command will start only the PostgreSQL
container:
docker compose up
This command will use your default docker-compose.yml file to start the PostgreSQL
service, but Medusa
will not be started automatically. This step is required because we create a network in PostgreSQL
, and Medusa
depends on it.
- Run Medusa app manually
cd medusa-marketplace-demo
yarn
cp .env.template .env
npx medusa db:setup --db marketplace
yarn dev
The Medusa dashboard should now be running on http://localhost:9000/app
If you want to remove the containers, networks, and volumes created by Docker Compose, use the following commands:
Option 1: Using the default docker-compose.yml
(for PostgreSQL only)
docker compose down -v
Option 2: Using the combined docker-compose.yml
and docker-compose.medusa.yml
docker compose -f docker-compose.yml -f docker-compose.medusa.yml down -v
MIT