Skip to main content

Running Locally

Saleor is a 12-factor application that is configured using environment variables. We recommend using Docker because it takes care of all necessary dependencies.

1

Install Docker

Install Docker Desktop and Docker Compose.

Note: To install Docker Desktop on Windows Home, follow the instructions.

2

Clone repository

Build Docker images by cloning the repository and running the following commands:

git clone https://github.com/saleor/saleor-platform.git
cd saleor-platform
docker compose build
3

Apply migrations

These commands would update the database schema to the latest version.

docker compose run --rm api python3 manage.py migrate
4

Add sample data

Optionally, populate the database with sample data:

docker compose run --rm api python3 manage.py populatedb
5

Create admin account

Follow the prompt to add admin user name and password.

docker compose run --rm api python3 manage.py createsuperuser
6

Running the services

Run all Saleor containers (from within the saleor-platform directory):

The dashboard will now be available at localhost:9000

docker compose up
7

Optional: Add live reloading

This step is optional for those who want to contribute to Saleor.

Saleor uses shared folders to enable live code reloading. If you're using Windows or MacOS you will need to:

  • Add the cloned saleor-platform directory to the list of shared directories in Docker (Settings -> Shared Drives or Preferences -> Resources -> File sharing).
  • Make sure that in Docker preferences, you have dedicated at least 5 GB of memory (Settings -> Advanced or Preferences -> Resources -> Advanced).