Saleor

Deployment

For our first attempt, we deployed Saleor onto two separate servers:

  1. https://ecommerce.hatherleigh.info/ for the saleor-dashboard

  2. https://saleor.hatherleigh.info/ for the Saleor API

This was to workaround issues with the “back” URL (see more recent install notes for details).

For future deployments, we can deploy two sites to the same server. The two domain names will keep the Nginx configuration separate.

Install

Tip

The more recent install notes are here…

Linux install uses Docker, so follow Manual Installation on Windows

cd ~/dev/src/
git clone git@github.com:saleor/saleor.git
cd saleor
python3 -m venv venv
source venv/bin/activate.fish
pip install -r requirements.txt
createuser --username=postgres --superuser --pwprompt saleor  # Enter password for new role: saleor
createdb  --username=postgres --owner=saleor saleor
python manage.py migrate --no-input
python manage.py createsuperuser
# Email: patrick@kbsoftware.co.uk
# Password: letmein1  (minimum-length 8 characters)
# In ~/dev/src/saleor
# create a .env.fish file with these contents
source venv/bin/activate.fish
set -x ALLOWED_HOSTS "localhost,127.0.0.1"
# may only be needed for the node app ('saleor-dashboard')
set -x API_URI "http://localhost:8000/graphql/"
set -x DJANGO_SETTINGS_MODULE saleor.settings
echo "ALLOWED_HOSTS:" $ALLOWED_HOSTS
echo "API_URI:" $API_URI
echo "DJANGO_SETTINGS_MODULE:" $DJANGO_SETTINGS_MODULE
source .env.fish
python manage.py runserver 0.0.0.0:8000

Saleor Dashboard Install

cd ~/dev/src/
git clone git@github.com:saleor/saleor-dashboard.git
cd saleor-dashboard

Install Volta if required

curl https://get.volta.sh ¦ bash

and once installed, open a new terminal window to continue.

volta install node@14
npm install
# create a .env.fish file with these contents
set -x API_URI "http://localhost:8000/graphql/"
source .env.fish
npm start

Browse to http://localhost:9000/

Configuration

  • Activate the Channel

  • Give the product variant a price.

  • Before using a warehouse it needs to be made Public (or use the WarehouseUpdate API)

Issues

The search does not appear to activate until you have entered 6 characters.