Installation for macOS¶
Before you are ready to run Saleor you will need additional software installed on your computer.
Version 8 or later is required. Download the macOS installer from the Node.js downloads page.
Saleor needs PostgreSQL version 9.4 or above to work. Get the macOS installer from the PostgreSQL download page.
Make sure you keep track of the password you set for the administration account during installation.
Command Line Tools for Xcode¶
Download and install the latest version of “Command Line Tools (macOS 10.x) for Xcode 9.x” from the Downloads for Apple Developers page.
$ xcode-select --install
Run the following command:
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
Use Homebrew to install the latest version of Python 3:
$ brew install python3
Use Homebrew to install Git:
$ brew install git
Use Homebrew to install the graphical libraries necessary for PDF creation:
$ brew install cairo pango gdk-pixbuf libffi
Clone the repository (or use your own fork):
$ git clone https://github.com/mirumee/saleor.git
Enter the directory:
$ cd saleor/
Install all dependencies:
We strongly recommend creating a virtual environment before installing any Python packages.
$ pip install -r requirements.txt
We try to provide usable default values for all of the settings. We’ve decided not to provide a default for
SECRET_KEYas we fear someone would inevitably ship a project with the default value left in code.
$ export SECRET_KEY='<mysecretkey>'
Secret key should be a unique string only your team knows. Running code with a known
SECRET_KEYdefeats many of Django’s security protections, and can lead to privilege escalation and remote code execution vulnerabilities. Consult Django’s documentation for details.
Create a PostgreSQL user:
Unless configured otherwise the store will use
saleoras both username and password. Remeber to give your user the
SUPERUSERprivilege so it can create databases and database extensions.
$ createuser –superuser –pwprompt saleor
saleorwhen prompted for password.
Prepare the database:
$ python manage.py migrate
This command will need to be able to create database extensions. If you get an error related to the
CREATE EXTENSIONcommand please review the notes from the user creation step.
Install front-end dependencies:
$ npm install
If this step fails go back and make sure you’re using new enough version of Node.js.
Prepare front-end assets:
$ npm run build-assets
$ npm run build-emails
Start the development server:
$ python manage.py runserver