- Install postgresql software (Version 9.5 on Ubuntu 16.04) :
sudo apt-get install postgresql
- Define a password for the postgres user, following this answer:
sudo -u postgres psql postgres
In the postgresql command-line, type
\password postgres
Once the password is set, leave that command-line with
\q
- Create the PostgreSQL user
saleor
with passwordsaleor
:
sudo -u postgres createuser --interactive --pwprompt --superuser saleor
Provide user saleor
with superuser rights. Do not do that in production deployments.
- Create the PostgreSQL database
saleor
:
sudo -u postgres createdb -O saleor -e saleor
See https://askubuntu.com/questions/865554/how-do-i-install-python-3-6-using-apt-get
sudo add-apt-repository ppa:jonathonf/python-3.6
sudo apt update
sudo apt install python3.6 python3.6-dev
Proceed with the following steps, documented by saleor,
- Install the following packages:
sudo apt install build-essential python3-venv python3-dev python3-pip python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
- Install the
pipenv
package using any method, for exemple withpip
:
pip3 install pipenv
- Clone our forked saleor repository:
git clone https://github.com/softozor/saleor.git
- Install saleor requirements and let
pipenv
automaticaly create a virtualenv
cd saleor
pipenv install
- Activate the virtualenv from within newly created
saleor
directory :
pipenv shell
- Add secret key to
$VIRTUAL_ENV/bin/postactivate
script (cf. this answer):
export SECRET_KEY=theSecretKey
- Prepare the database
./manage.py migrate
- Install frontend
npm i
npm run build-assets
npm run build-emails
- Run the development server:
./manage.py runserver