Instalasi di PC - MappingSystem/Tutorial-Buka-Toko GitHub Wiki

Sesi ini kita akan kupas tentang cara mempersiapkan Aplikasi Saleor di PC.

Table of Contents

Kebutuhan

Minimum

Lihat Kebutuhan minimum

  • Python 3.5 or later
  • Node.js Version 10 or later
  • PostgreSQL version 9.4 or above

Setel Python

Default

Via Alias

$ which python
which: no python in /usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:

$ ls /usr/bin/python*
/usr/bin/python3.7         /usr/bin/python3.7m.exe
/usr/bin/python3.7-config  /usr/bin/python3.7m-config

$ ln -s /usr/bin/python3.7 /usr/bin/python

$ which python
/usr/bin/python

$ python --version
Python 3.7.3

Via Alternative

$ ls /usr/bin/python*

$ python --version
Python 2.7.15rc1
$ python3 --version
Python 3.6.7
$ sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.6 1
$ python --version
Python 3.6.7

$ sudo apt install python-pip
$ sudo apt-get install build-essential python3-dev python3-pip python3-cffi \
libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev \
shared-mime-info

$ curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
$ sudo apt-get install -y nodejs
$ sudo npm install -g npm@latest

$ sudo apt-get update
$ sudo apt-get install gtk2.0

Virtual Env

$ ls /usr/bin/pip*
/usr/bin/pip3.7
$ ln -s /usr/bin/pip3.7 /usr/bin/pip

$ pip --version
pip 19.0.3 from /usr/lib/python3.7/site-packages/pip (python 3.7)

$ python -m venv virtual-env
$ source virtual-env/bin/activate
(virtual-env)

$ sudo apt-get install libjpeg-dev zlib1g-dev
$ pip install Pillow
$ pip install -r requirements.txt

Solusi Rebase

Jika terdapat error fixing-fork-failures

2 [main] python3.7m 1771 child_info_fork::abort: address space needed by 
'cygcrypto-1.1.dll' (0x830000) is already occupied
Maka lakukan full rebase atau fixing bloda bila perlu
  1. run rebase-trigger fullrebase, matikan semua proses dan layanan Cygwin, jalankan setup
  2. start ash atau dash (jangan gunakan bash atau terminal emulator seperti rxvt atau mintty).
  3. cara termudah untuk melakukan ini adalah menggunakan Windows Explorer dan arahkan ke tingkat atas instalasi cygwin Anda, dan klik dua kali ash.exe atau dash.exe di direktori bin /.
  4. jalankan /bin/rebaseall (di jendela ash / dash), restart komputer

Database

Create a PostgreSQL user
Create a PostgreSQL database

http://toguko.com/blog/install-saleor-e-commerce.html

DATABASES = {
    'default': dj_database_url.config(
        default='postgres://USER:PASS@localhost:5432/saleor',
        conn_max_age=600)}

Setel npm

⚠️ **GitHub.com Fallback** ⚠️