Giter VIP home page Giter VIP logo

ruthfully-graphql-api's Introduction

Crafts GraphQL API

Core API for arts/crafts website, extending and customising the Saleor (2.11) eCommerce platform.

Running on Linux:

Running on an EC2 instance (Ubuntu 20.04), I found I needed a few extra packages: libpangocairo-1.0-0 libpango-1.0-0 pango-1.0 libcairo2-dev. With these added, everything ran smoothly, and should do for you too.

Since there isn't a manual installation guide for Saleor on Ubuntu I've written up an updated version of Neerajgupta2407's setup guide for Python 3.8:

Initial setup of machine:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get -y upgrade

Python:

sudo apt-get install python3.8 libpython3.8-dev python3-all-dev
sudo apt install virtualenv postgresql uwsgi libpangocairo-1.0-0 libpango-1.0-0 pango-1.0 libcairo2-dev
sudo apt-get install build-essential python3-dev

Node and Node Version Manager:

sudo apt install npm

curl https://raw.githubusercontent.com/creationix/nvm/master/install.sh | bash

source ~/.profile 
source ~/.bashrc
nvm install v12

Setup directories, and clone code:

mkdir -p code/backend
cd code/backend
git clone https://github.com/Luka-Abey/ruthfully-graphql-api
virtualenv -p python3.8 venv
source venv/bin/activate
cd ruthfully-graphql-api
pip install -r requirements.txt

Set up a Postgres user:

sudo su - postgres
psql

CREATE ROLE saleor WITH LOGIN PASSWORD 'saleor';
CREATE DATABASE saleor;
ALTER USER saleor WITH SUPERUSER;

GRANT ALL PRIVILEGES ON DATABASE saleor TO saleor;
ALTER USER saleor CREATEDB;

Export variables:

export ALLOWED_HOSTS=<your-public-IP>
export ALLOWED_CLIENT_HOSTS=<your-public-IP>
export DEBUG=True
export SECRET_KEY=<your-secret-key>
export INTERNAL_IPS=127.0.0.1,<your-public-IP>,
export DEFAULT_COUNTRY=UK
export DEFAULT_CURRENCY=GBP

Applying migrations, generating dummy data, and creating superuser:

python manage.py migrate

python manage.py populatedb
 
python manage.py createsuperuser

Run server:

python manage.py runserver 0.0.0.0:8000

Built With

By Mirumee and Luka-Abey

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.