Skip to content
This repository has been archived by the owner on Mar 2, 2020. It is now read-only.

Latest commit

 

History

History
112 lines (76 loc) · 2.3 KB

manual-installation-saleor-ubuntu-16.04.md

File metadata and controls

112 lines (76 loc) · 2.3 KB

Development installation of saleor in an Ubuntu VM

Installing postgres

  1. Install postgresql software (Version 9.5 on Ubuntu 16.04) :
sudo apt-get install postgresql
  1. 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
  1. Create the PostgreSQL user saleor with password saleor:
sudo -u postgres createuser --interactive --pwprompt --superuser saleor

Provide user saleor with superuser rights. Do not do that in production deployments.

  1. Create the PostgreSQL database saleor:
sudo -u postgres createdb -O saleor -e saleor

Installing Python 3.6

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

Installing Gtk+

Installing saleor

Proceed with the following steps, documented by saleor,

  1. 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
  1. Install the pipenv package using any method, for exemple with pip :
pip3 install pipenv
  1. Clone our forked saleor repository:
git clone https://github.com/softozor/saleor.git
  1. Install saleor requirements and let pipenv automaticaly create a virtualenv
cd saleor
pipenv install
  1. Activate the virtualenv from within newly created saleor directory :
pipenv shell
  1. Add secret key to $VIRTUAL_ENV/bin/postactivate script (cf. this answer):
export SECRET_KEY=theSecretKey
  1. Prepare the database
./manage.py migrate
  1. Install frontend
npm i
npm run build-assets
npm run build-emails
  1. Run the development server:
./manage.py runserver