diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 70e58760631..536ecfbc8a8 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -18,4 +18,5 @@ about: Create a report to help us improve **System information** -Operating system: +Operating system: +Browser: diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index ca2e60a5100..00000000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,5 +0,0 @@ -blank_issues_enabled: false -contact_links: - - name: 💬 Spectrum - url: https://spectrum.chat/saleor - about: If you have a support question or need help getting Saleor to work, please use our Spectrum. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 02e9c60f2aa..315375e114f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,22 +1,25 @@ -I want to merge this change because... - +### Summary +Main Code: +``` + +``` -# Impact +### Pull Request Checklist -* [ ] New migrations -* [ ] New/Updated API fields or mutations -* [ ] Deprecated API fields or mutations -* [ ] Removed API types, fields, or mutations -* [ ] Documentation needs to be updated + -# Pull Request Checklist +1. [ ] Privileged views and APIs are guarded by proper permission checks. +1. [ ] All visible strings are translated with proper context. +1. [ ] All data-formatting is locale-aware (dates, numbers, and so on). +1. [ ] Database queries are optimized and the number of queries is constant. +1. [ ] Database migration files are up to date. +1. [ ] The changes are tested. +1. [ ] The code is documented (docstrings, project documentation). +1. [ ] GraphQL schema and type definitions are up to date. +1. [ ] Changes are mentioned in the changelog. - +### Screenshots -* [ ] Privileged queries and mutations are guarded by proper permission checks -* [ ] Database queries are optimized and the number of queries is constant -* [ ] Database migration files are up to date -* [ ] The changes are tested -* [ ] GraphQL schema and type definitions are up to date -* [ ] Changes are mentioned in the changelog + diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 4584c575beb..00000000000 --- a/.github/stale.yml +++ /dev/null @@ -1,60 +0,0 @@ -# Configuration for probot-stale - https://github.com/probot/stale - -# Number of days of inactivity before an Issue or Pull Request becomes stale -daysUntilStale: 60 - -# Number of days of inactivity before an Issue or Pull Request with the stale label is closed. -# Set to false to disable. If disabled, issues still need to be closed manually, but will remain marked as stale. -daysUntilClose: 7 - -# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled) -onlyLabels: [] - -# Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable -exemptLabels: - - bug - - blocker - - backlog - -# Set to true to ignore issues in a project (defaults to false) -exemptProjects: false - -# Set to true to ignore issues in a milestone (defaults to false) -exemptMilestones: false - -# Set to true to ignore issues with an assignee (defaults to false) -exemptAssignees: false - -# Label to use when marking as stale -staleLabel: stale - -# Comment to post when marking as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. - -# Comment to post when removing the stale label. -# unmarkComment: > -# Your comment here. - -# Comment to post when closing a stale Issue or Pull Request. -# closeComment: > -# Your comment here. - -# Limit the number of actions per hour, from 1-30. Default is 30 -limitPerRun: 30 -# Limit to only `issues` or `pulls` -# only: issues - -# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': -# pulls: -# daysUntilStale: 30 -# markComment: > -# This pull request has been automatically marked as stale because it has not had -# recent activity. It will be closed if no further activity occurs. Thank you -# for your contributions. - -# issues: -# exemptLabels: -# - confirmed diff --git a/.github/workflows/__init__ b/.github/workflows/__init__ new file mode 120000 index 00000000000..0f44f8871c7 --- /dev/null +++ b/.github/workflows/__init__ @@ -0,0 +1 @@ +../../.google/cloud/__init__ \ No newline at end of file diff --git a/.github/workflows/builders/__init__ b/.github/workflows/builders/__init__ new file mode 120000 index 00000000000..7d1b5d0a67c --- /dev/null +++ b/.github/workflows/builders/__init__ @@ -0,0 +1 @@ +../../../.google/cloud/builders/__init__ \ No newline at end of file diff --git a/.github/workflows/builders/ubuntu/artifact.sh b/.github/workflows/builders/ubuntu/artifact.sh new file mode 100644 index 00000000000..2adb2987bb9 --- /dev/null +++ b/.github/workflows/builders/ubuntu/artifact.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +echo -e "WHOAMI\n$hr" +whoami +echo $HOME +id + +if [[ -x "$(command -v gcloud)" ]] +then + echo -e "$hr\nPROJECT CONFIG\n$hr" + gcloud config list --all + + echo -e "\n$hr\nSYSTEM INFO\n$hr" + gcloud info + python --version +fi + +echo -e "\n$hr\nHOME PROFILES\n$hr" +ls -al $HOME + +echo -e "$hr\nROOT PROFILES\n$hr" +[[ "$(whoami)" == "root" ]] && ls -alL /root || sudo bash -c 'ls -alL /root' + +echo -e "$hr\nSSH FILES\n$hr" +echo $(whoami) /root/.ssh +[[ "$(whoami)" == "root" ]] && ls -alL /root/.ssh || sudo bash -c 'ls -alL /root/.ssh' + +echo -e "$hr\nBIN FILES\n$hr" +echo $HOME/.local/bin +ls -al $HOME/.local/bin + +echo -e "\n$hr\nFILE SYSTEM\n$hr" +df -h + +echo -e "\n$hr\nALL REPOSITORY\n$hr" +pwd +ls -al / + +echo -e "\n$hr\nCURRENT REPOSITORY\n$hr" +pwd +ls -al . + +if [[ ! -x "$(command -v docker)" ]] +then + echo -e "\n$hr\nDOCKER VERSION\n$hr" + docker version + + echo -e "\n$hr\nDOCKER INFO\n$hr" + docker info + + echo -e "$hr\nIMAGE BUILDERS\n$hr" + docker images --all | sort + + echo -e "\n$hr\nCURRENTLY RUNNING\n$hr" + docker ps +fi diff --git a/.github/workflows/init.yml b/.github/workflows/init.yml new file mode 100644 index 00000000000..7b7264ca903 --- /dev/null +++ b/.github/workflows/init.yml @@ -0,0 +1,23 @@ +name: Init CI +on: + push: + branches: + - '*' + - '!master' + - '!deploy' + - '!compose' + - '!production' + - '!development' + - '!Chetabahana' +jobs: + job1: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: Initializing Repositories + run: | + bash .github/workflows/builders/__init__ + env: + GCP_SA_KEY: ${{ secrets.GCP_SA_KEY }} + GCP_ACCOUNT: ${{ secrets.GCP_ACCOUNT }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 2b7a5892d02..a7dcb0dab41 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ !.flowconfig !.github !.gitignore +!.google !.gqlconfig !.npmrc !.nvmrc diff --git a/.google/cloud/__init__ b/.google/cloud/__init__ new file mode 100644 index 00000000000..8e45f17618c --- /dev/null +++ b/.google/cloud/__init__ @@ -0,0 +1,39 @@ +#!/bin/bash + +# Unmark the 2 line below to see all commands available +#echo -e "\n$hr\nPATH COMMANDS\n$hr" +#compgen -c | xargs which -a | sort && dpkg -l + +# Collumn numbers +COL=130 +case $HOME in + /root) COL=140;; + /builder/home) COL=180;; +esac + +printf -v res %${COL}s +export hr=`printf '%s\n' "${res// /-}"` +export hrd=`printf '%s\n' "${res// /=}"` + +# Set Environtment +export WORKSPACE=$(realpath .) +export PATH=$HOME/.local/bin:$PATH + +if [[ -n "${GITHUB_REPOSITORY+set}" ]] +then + [[ -z $TAG_NAME ]] && export TAG_NAME=ubuntu + [[ -z $REPO_NAME ]] && export REPO_NAME=${GITHUB_REPOSITORY##*/} + [[ -z $REPO_OWNER ]] && export REPO_OWNER=${GITHUB_REPOSITORY%/*} + [[ -z $BRANCH_REF_HEADS ]] && export BRANCH_REF_HEADS=${GITHUB_REF##*/} + [[ -z $BRANCH_NAME ]] && export BRANCH_NAME=$(basename $(git name-rev --name-only HEAD)) + [[ -z $PROJECT_ID ]] && export PROJECT_ID=$(echo "$REPO_OWNER" | tr '[:upper:]' '[:lower:]') +fi + +# Set the path to output volume +( [[ -n "${TAG_REPO+set}" ]] && [[ "$REPO_NAME" == "github_"* ]] ) && export REPO_NAME=$TAG_REPO +[[ -n "${RUNNER_WORKSPACE+set}" ]] && export OUTPUTS_VOLUME=$RUNNER_WORKSPACE/outputs/volume +[[ -n "${BUILDER_OUTPUT+set}" ]] && export OUTPUTS_VOLUME=/builder/outputs/volume +[[ -z "${OUTPUTS_VOLUME}" ]] && export OUTPUTS_VOLUME=$RWORKSPACE/outputs +[[ -z "${DEBIAN_FRONTEND}" ]] && export DEBIAN_FRONTEND=noninteractive +[[ -n "${INVOCATION_ID+set}" ]] && export BUILD_ID=${INVOCATION_ID} +[[ ! -d $OUTPUTS_VOLUME ]] && mkdir -p $OUTPUTS_VOLUME diff --git a/.google/cloud/builders/__init__ b/.google/cloud/builders/__init__ new file mode 100644 index 00000000000..32b0e987bc0 --- /dev/null +++ b/.google/cloud/builders/__init__ @@ -0,0 +1,124 @@ +#!/bin/bash + +# Parameters +while [[ "$1" != "" ]]; do + eval export "$1" &> /dev/null + shift +done + +# Environtment +get_workspace() +{ + echo Set Environtments.. + export NAMESPACE=$(realpath ${0%/*}) + + # Namespace Environtments + INHERIT=$(dirname ${NAMESPACE})/__init__ + if [[ -f $INHERIT ]]; then source $INHERIT; fi + + # Workspace Environtments + if [[ -f $WORKSPACE/env_vars_to_export ]] + then + while read -r LINE; do + #Fetch variable names + EXPORT=$(sed -e 's/[[:space:]]*$//' <<<${LINE}) + VAR=`echo $EXPORT | cut -d '=' -f1`; + + #Verify each variables + ENV_VAR=$(echo $VAR) + if [[ -n ${ENV_VAR+set} ]]; then continue; + else eval export "$EXPORT" &> /dev/null; fi + done <$WORKSPACE/env_vars_to_export + fi + + # Injected Environtments + if ( [[ -z $DATA ]] && [[ -n ${JSON_DATA+set} ]] && [[ -x "$(command -v cf_export)" ]] ); \ + then echo $JSON_DATA > data.json && cf_export DATA=$(realpath data.json); fi +} + +# Get private repository +get_repository() +{ + # Set the workflows + echo Initializing Workflows.. + + # Set Google App Credentials + if [[ -x "$(command -v gcloud)" ]] + then + if [[ -z $(gcloud config get-value account 2> /dev/null) ]] + then + # Dependencies: GCP_ACCOUNT & GCP_SA_KEY + if [[ -z $GOOGLE_APPLICATION_CREDENTIALS ]] + then + echo $GCP_SA_KEY > .google-app-creds.json + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath .google-app-creds.json) + fi + + # Activate account + gcloud config set project $PROJECT_ID &> /dev/null + gcloud auth activate-service-account $GCP_ACCOUNT --project=$PROJECT_ID \ + --key-file=$GOOGLE_APPLICATION_CREDENTIALS &> /dev/null + + [[ -x "$(command -v cf_export)" ]] && cf_export $GCP_ACCOUNT=$GCP_ACCOUNT \ + GOOGLE_APPLICATION_CREDENTIALS=$GOOGLE_APPLICATION_CREDENTIALS + fi + fi + + if [[ ! -d $WORKSPACE/.io ]] + then + if [[ -x "$(command -v gcloud)" ]] + then + # Dependencies: Set the repository in to Google Repository + # Name the target repo to be on top of the list and Set IAM role to clone it + export REPOSITORY=$(gcloud source repos list --limit=1 --format 'value(REPO_NAME)') + gcloud source repos clone --verbosity=none $REPOSITORY $WORKSPACE/.io &> /dev/null + [[ -x "$(command -v cf_export)" ]] && cf_export REPOSITORY=$REPOSITORY + fi + fi + + # Send to environtment + [[ -d $WORKSPACE/.io ]] && cd $WORKSPACE/.io || exit 0; + [[ -z $REPOSITORY ]] && export REPOSITORY=$(git remote get-url origin) + export MATCH_REPOSITORY=${REPOSITORY##*_} RUNNER=$HOME/.local/bin/run + + # Locate the branch + if [[ "$BRANCH_NAME" != "master" ]] + then + if grep -q origin/$BRANCH_NAME << EOF +`git branch -r` +EOF + then + git checkout $BRANCH_NAME + fi + fi + + # Locate the files + if [[ ! -f $RUNNER ]] + then + for i in $(ls -d */) + do + mkdir -p $HOME/.local/$(basename ${i%%/}) + cp -frpT ${i%%/} $HOME/.local/$(basename ${i%%/}) + done + fi +} + +# Run the current step +while [[ -z $ORIGIN ]] +do + # Loop for environtments + [[ $ENV == true ]] && printenv | sort + if [[ -z $WORKSPACE ]]; then get_workspace; + elif [[ -z $MATCH_REPOSITORY ]]; then get_repository; + elif [[ $(command -v run) == $RUNNER ]]; then run $TAG_NAME; + elif [[ $(command -v push) == $PUSHER ]]; then push $TAG_NAME; + else echo "uncathed profiles and settings.."; fi + + # Avoid unwanted iteration + [[ -z $num ]] && num=0 || (( num += 1 )) + if [[ $num > 1 ]] + then + [[ ! -d $HOME/.ssh ]] && echo "step was failed, halted to continue.." + exit 0; + fi +done diff --git a/.google/cloud/builders/docker/__init__ b/.google/cloud/builders/docker/__init__ new file mode 100644 index 00000000000..8f38acabd4f --- /dev/null +++ b/.google/cloud/builders/docker/__init__ @@ -0,0 +1,118 @@ +#!/bin/bash + +: <<'END' +$ docker run --help +Usage: docker run [OPTIONS] IMAGE [COMMAND] [ARG...] +Run a command in a new container +See https://docs.docker.com/engine/reference/commandline/run/ + +Options: + --add-host list Add a custom host-to-IP mapping (host:ip) + -a, --attach list Attach to STDIN, STDOUT or STDERR + --blkio-weight uint16 Block IO (relative weight), between 10 and 1000, or 0 to disable (default 0) + --blkio-weight-device list Block IO weight (relative device weight) (default []) + --cap-add list Add Linux capabilities + --cap-drop list Drop Linux capabilities + --cgroup-parent string Optional parent cgroup for the container + --cidfile string Write the container ID to the file + --cpu-period int Limit CPU CFS (Completely Fair Scheduler) period + --cpu-quota int Limit CPU CFS (Completely Fair Scheduler) quota + --cpu-rt-period int Limit CPU real-time period in microseconds + --cpu-rt-runtime int Limit CPU real-time runtime in microseconds + -c, --cpu-shares int CPU shares (relative weight) + --cpus decimal Number of CPUs + --cpuset-cpus string CPUs in which to allow execution (0-3, 0,1) + --cpuset-mems string MEMs in which to allow execution (0-3, 0,1) + -d, --detach Run container in background and print container ID + --detach-keys string Override the key sequence for detaching a container + --device list Add a host device to the container + --device-cgroup-rule list Add a rule to the cgroup allowed devices list + --device-read-bps list Limit read rate (bytes per second) from a device (default []) + --device-read-iops list Limit read rate (IO per second) from a device (default []) + --device-write-bps list Limit write rate (bytes per second) to a device (default []) + --device-write-iops list Limit write rate (IO per second) to a device (default []) + --disable-content-trust Skip image verification (default true) + --dns list Set custom DNS servers + --dns-option list Set DNS options + --dns-search list Set custom DNS search domains + --entrypoint string Overwrite the default ENTRYPOINT of the image + -e, --env list Set environment variables + --env-file list Read in a file of environment variables + --expose list Expose a port or a range of ports + --group-add list Add additional groups to join + --health-cmd string Command to run to check health + --health-interval duration Time between running the check (ms|s|m|h) (default 0s) + --health-retries int Consecutive failures needed to report unhealthy + --health-start-period duration Start period for the container to initialize before starting health-retries countdown (ms|s|m|h) (default 0s) + --health-timeout duration Maximum time to allow one check to run (ms|s|m|h) (default 0s) + --help Print usage + -h, --hostname string Container host name + --init Run an init inside the container that forwards signals and reaps processes + -i, --interactive Keep STDIN open even if not attached + --ip string IPv4 address (e.g., 172.30.100.104) + --ip6 string IPv6 address (e.g., 2001:db8::33) + --ipc string IPC mode to use + --isolation string Container isolation technology + --kernel-memory bytes Kernel memory limit + -l, --label list Set meta data on a container + --label-file list Read in a line delimited file of labels + --link list Add link to another container + --link-local-ip list Container IPv4/IPv6 link-local addresses + --log-driver string Logging driver for the container + --log-opt list Log driver options + --mac-address string Container MAC address (e.g., 92:d0:c6:0a:29:33) + -m, --memory bytes Memory limit + --memory-reservation bytes Memory soft limit + --memory-swap bytes Swap limit equal to memory plus swap: '-1' to enable unlimited swap + --memory-swappiness int Tune container memory swappiness (0 to 100) (default -1) + --mount mount Attach a filesystem mount to the container + --name string Assign a name to the container + --network string Connect a container to a network (default "default") + --network-alias list Add network-scoped alias for the container + --no-healthcheck Disable any container-specified HEALTHCHECK + --oom-kill-disable Disable OOM Killer + --oom-score-adj int Tune host's OOM preferences (-1000 to 1000) + --pid string PID namespace to use + --pids-limit int Tune container pids limit (set -1 for unlimited) + --privileged Give extended privileges to this container + -p, --publish list Publish a container's port(s) to the host + -P, --publish-all Publish all exposed ports to random ports + --read-only Mount the container's root filesystem as read only + --restart string Restart policy to apply when a container exits (default "no") + --rm Automatically remove the container when it exits + --runtime string Runtime to use for this container + --security-opt list Security Options + --shm-size bytes Size of /dev/shm + --sig-proxy Proxy received signals to the process (default true) + --stop-signal string Signal to stop a container (default "SIGTERM") + --stop-timeout int Timeout (in seconds) to stop a container + --storage-opt list Storage driver options for the container + --sysctl map Sysctl options (default map[]) + --tmpfs list Mount a tmpfs directory + -t, --tty Allocate a pseudo-TTY + --ulimit ulimit Ulimit options (default []) + -u, --user string Username or UID (format: [:]) + --userns string User namespace to use + --uts string UTS namespace to use + -v, --volume list Bind mount a volume + --volume-driver string Optional volume driver for the container + --volumes-from list Mount volumes from the specified container(s) + -w, --workdir string Working directory inside the container +END + +# Set runtime +RUNTIME=$(basename $(head -n 1 $1)) +if [[ $(dpkg -l | grep $RUNTIME) ]]; then $RUNTIME $1 && exit 0; fi + +IMAGE=$(docker images --format "{{.Repository}}" | grep -w $RUNTIME | head -n 1) +( [[ -z "$IMAGE" ]] || [[ "$IMAGE" != "gcr.io/cloud-builders/"* ]] ) && IMAGE=$RUNTIME + +# Run docker image +docker run \ +--env-file /root/.ssh/env_keys \ +--user saleor:saleor \ +--volume $WORKSPACE:/workspace \ +--volume $HOME/.ssh:/root/.ssh \ +--volume $OUTPUTS_VOLUME:/outputs \ +--workdir /workspace \ +$IMAGE bash -c 'ls -alR' diff --git a/.google/cloud/builders/docker/artifact.sh b/.google/cloud/builders/docker/artifact.sh new file mode 100644 index 00000000000..e734526c894 --- /dev/null +++ b/.google/cloud/builders/docker/artifact.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +echo -e "WHOAMI\n$hr" +whoami +echo $HOME +id + +echo -e "\n$hr\nHOME PROFILES\n$hr" +echo $HOME +ls -al $HOME + +echo -e "$hr\nROOT PROFILES\n$hr" +echo "/root -> $HOME" +[[ "$(whoami)" == "root" ]] && ls -alL /root || sudo bash -c 'ls -al /root' + +echo -e "$hr\nSSH FILES\n$hr" +echo "/root/.ssh -> $HOME/.ssh" +[[ "$(whoami)" == "root" ]] && ls -al /root/.ssh || sudo bash -c 'ls -alL /root/.ssh' + +echo -e "\n$hr\nENVIRONTMENT\n$hr" +HR=$hr && unset hr +HRD=$hrd && unset hrd +printenv | sort +export hr=$HR +export hrd=$HRD + +echo -e "\n$hr\nFILE SYSTEM\n$hr" +df -h + +echo -e "\n$hr\nALL REPOSITORY\n$hr" +ls -al / + +echo -e "\n$hr\nCURRENT REPOSITORY\n$hr" +pwd +ls -al . + +[[ ! -x "$(command -v docker)" ]] && exit 0 +echo -e "\n$hr\nDOCKER VERSION\n$hr" +docker version + +echo -e "\n$hr\nDOCKER INFO\n$hr" +docker info + +echo -e "$hr\nIMAGE BUILDERS\n$hr" +docker images --all | sort + +echo -e "\n$hr\nCURRENTLY RUNNING\n$hr" +docker ps \ No newline at end of file diff --git a/.google/cloud/builders/gcloud/__init__ b/.google/cloud/builders/gcloud/__init__ new file mode 100644 index 00000000000..a1c22d9783c --- /dev/null +++ b/.google/cloud/builders/gcloud/__init__ @@ -0,0 +1,5 @@ +#!/bin/bash + +# Set runtime +RUNTIME=$(basename $(head -n 1 $1)) +if [[ $(dpkg -l | grep $RUNTIME) ]]; then $RUNTIME $1 && exit 0; fi diff --git a/.google/cloud/builders/gcloud/artifact.sh b/.google/cloud/builders/gcloud/artifact.sh new file mode 100644 index 00000000000..255287cfe49 --- /dev/null +++ b/.google/cloud/builders/gcloud/artifact.sh @@ -0,0 +1,55 @@ +#!/bin/bash + +echo -e "WHOAMI\n$hr" +whoami +echo $HOME +id + +echo -e "$hr\nPROJECT CONFIG\n$hr" +gcloud config list --all + +echo -e "\n$hr\nSYSTEM INFO\n$hr" +gcloud info +python --version + +echo -e "\n$hr\nHOME PROFILES\n$hr" +echo $HOME +ls -al $HOME + +echo -e "$hr\nROOT PROFILES\n$hr" +echo "/root -> $HOME" +[[ "$(whoami)" == "root" ]] && ls -alL /root || sudo bash -c 'ls -al /root' + +echo -e "$hr\nSSH FILES\n$hr" +echo "/root/.ssh -> $HOME/.ssh" +[[ "$(whoami)" == "root" ]] && ls -alL /root/.ssh || sudo bash -c 'ls -al /root/.ssh' + +echo -e "\n$hr\nENVIRONTMENT\n$hr" +HR=$hr && unset hr +HRD=$hrd && unset hrd +printenv | sort +export hr=$HR +export hrd=$HRD + +echo -e "\n$hr\nFILE SYSTEM\n$hr" +df -h + +echo -e "\n$hr\nALL REPOSITORY\n$hr" +ls -al / + +echo -e "\n$hr\nCURRENT REPOSITORY\n$hr" +pwd +ls -al . + +[[ ! -x "$(command -v docker)" ]] && exit 0 +echo -e "\n$hr\nDOCKER VERSION\n$hr" +docker version + +echo -e "\n$hr\nDOCKER INFO\n$hr" +docker info + +echo -e "$hr\nIMAGE BUILDERS\n$hr" +docker images --all | sort + +echo -e "\n$hr\nCURRENTLY RUNNING\n$hr" +docker ps diff --git a/.google/cloudbuild.yaml b/.google/cloudbuild.yaml new file mode 100644 index 00000000000..bbdfbb25d72 --- /dev/null +++ b/.google/cloudbuild.yaml @@ -0,0 +1,32 @@ +steps: +- name: gcr.io/cloud-builders/gcloud + entrypoint: /bin/bash + args: [$_INIT] + id: gcloud + env: + - TAG_NAME=gcloud + +- name: gcr.io/cloud-builders/docker + entrypoint: /bin/bash + args: [$_INIT] + id: docker + env: + - TAG_NAME=docker + +options: + env: + - BUILD_ID=$BUILD_ID + - PROJECT_ID=$PROJECT_ID + - TAG_REPO=$_TAG_REPO + - REPO_NAME=$REPO_NAME + - BRANCH_NAME=$BRANCH_NAME + volumes: + - name: outputs-volume + path: /builder/outputs/volume + +substitutions: + _INIT: .google/cloud/builders/__init__ + _VERSION: v1-2007141218-5f0da269d6aa6bfccab5e54a-gcp + +timeout: 300s +tags: ['$_PR_NUMBER', '$_REPO_OWNER', '$_REPO', '$_SHA'] diff --git a/README.md b/README.md index cc9b8e9ad14..77d6fc8f8bd 100644 --- a/README.md +++ b/README.md @@ -1,162 +1,102 @@ -![Saleor Commerce - A GraphQL-first platform for perfectionists](https://user-images.githubusercontent.com/249912/71523206-4e45f800-28c8-11ea-84ba-345a9bfc998a.png) - -
-

Saleor Commerce

-
- -
- Customer-centric e-commerce on a modern stack -
- -
- A headless, GraphQL-first e-commerce platform delivering ultra-fast, dynamic, personalized shopping experiences. Beautiful online stores, anywhere, on any device. -
- -
- -
- Join our active, engaged community:
- Website - | - Blog - | - Twitter - | - Gitter - | - Spectrum -
- -
- -
- - Build status - - - Codecov - - - Documentation - - - Code style: black - -
- -## Table of Contents - -- [What makes Saleor special?](#what-makes-saleor-special) -- [Features](#features) -- [Installation](#installation) -- [Documentation](#documentation) -- [Demo](#demo) -- [Contributing](#contributing) -- [Translations](#translations) -- [Your feedback](#your-feedback) -- [License](#license) - -## What makes Saleor special? - -Saleor is a rapidly-growing open source e-commerce platform that has served high-volume companies from branches like publishing and apparel since 2012. Based on Python and Django, the latest major update introduces a modular front end powered by a GraphQL API and written with React and TypeScript. - -## Features - -- **PWA**: End users can shop offline for better sales and shopping experiences -- **GraphQL API**: Access all data from any web or mobile client using the latest technology -- **Headless commerce**: Build mobile apps, customize storefronts and externalize processes -- **UX and UI**: Designed for a user experience that rivals even the top commercial platforms -- **Dashboard**: Administrators have total control of users, processes, and products -- **Orders**: A comprehensive system for orders, dispatch, and refunds -- **Cart**: Advanced payment and tax options, with full control over discounts and promotions -- **Payments**: Flexible API architecture allows integration of any payment method. It comes with Braintree support out of the box. -- **Geo-adaptive**: Automatic localized pricing. Over 20 local languages. Localized checkout experience by country. -- **SEO**: Packed with features that get stores to a wider audience -- **Cloud**: Optimized for deployments using Docker -- **Analytics**: Server-side Google Analytics to report e-commerce metrics without affecting privacy - -Saleor is free and always will be. -Help us out… If you love free stuff and great software, give us a star! 🌟 - -![Saleor Storefront - React-based PWA e-commerce storefront](https://user-images.githubusercontent.com/249912/71527146-5b6be280-28da-11ea-901d-eb76161a6bfb.png) -![Saleor Dashboard - Modern UI for managing your e-commerce](https://user-images.githubusercontent.com/249912/71523261-8a795880-28c8-11ea-98c0-6281ea37f412.png) - -## Installation - -Saleor requires Python 3.8, Node.js 10.0+, PostgreSQL and OS-specific dependency tools. - -[See the Saleor docs](https://docs.saleor.io/docs/developer/installation) for step-by-step installation and deployment instructions. - -Note: -The `master` branch is the development version of Saleor and it may be unstable. To use the latest stable version, download it from the [Releases](https://github.com/mirumee/saleor/releases/) page or switch to a release tag. - -The current stable version is 2.10 and you should use this version for all three components: - -- Saleor: https://github.com/mirumee/saleor/releases/tag/2.10.1 -- Dashboard: https://github.com/mirumee/saleor-dashboard/releases/tag/2.10.0 -- Storefront: https://github.com/mirumee/saleor-storefront/releases/tag/2.10.3 - -## Documentation - -Saleor documentation is available here: [docs.saleor.io](https://docs.saleor.io) - -To contribute, please see the [`mirumee/saleor-docs` repository](https://github.com/mirumee/saleor-docs/). - -## Saleor Platform -The easiest way to run all components of Saleor (API, storefront and dashboard) together on your local machine is to use the [saleor-platform](https://github.com/mirumee/saleor-platform) project. Go to that repository for instructions on how to use it. - -[View saleor-platform](https://github.com/mirumee/saleor-platform) - -## Storefront - -For PWA, single-page storefront go to the [saleor-storefront](https://github.com/mirumee/saleor-storefront) repository. - -[View storefront demo](https://pwa.saleor.io/) - -## Dashboard - -For dashboard go to the [saleor-dashboard](https://github.com/mirumee/saleor-dashboard) repository. - -[View dashboard demo](https://pwa.saleor.io/dashboard/) - -## Demo - -Want to see Saleor in action? - -[View Storefront](https://pwa.saleor.io/) | [View Dashboard (admin area)](https://pwa.saleor.io/dashboard/) - -Or launch the demo on a free Heroku instance. - -[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) - -Login credentials: `admin@example.com`/`admin` - -## Contributing - -We love your contributions and do our best to provide you with mentorship and support. If you are looking for an issue to tackle, take a look at issues labeled [`Help Wanted`](https://github.com/mirumee/saleor/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). - -If nothing grabs your attention, check [our roadmap](https://github.com/mirumee/saleor/projects/12) or come up with your feature. Just drop us a line or [open an issue](https://github.com/mirumee/saleor/issues/new) and we’ll work out how to handle it. - -Get more details in our [Contributing Guide](https://docs.saleor.io/docs/developer/community/contributing). - -## Legacy views - -If you're interested in using the old version of Saleor, go the [legacy-views](https://github.com/mirumee/legacy-views) repository. It contains the 2.9.0 release, which includes Django-based views and HTML templates of Storefront 1.0 and Dashboard 1.0. Note: this version of Saleor is no longer officially maintained. - - -## Your feedback - -Do you use Saleor as an e-commerce platform? -Fill out this short survey and help us grow. It will take just a minute, but mean a lot! - -[Take a survey](https://mirumee.typeform.com/to/sOIJbJ) +

+ +Chetabahana.com | Situs Belanja Jual-Beli Barang & Promo Aneka Produk Fashion, Busana Muslim, Bayi & Anak-anak, Kecantikan, Tas, Sepatu, Peralatan Rumah Tangga, Elektronik, Makanan & Minuman Kemasan, dll. Soon The E-Shop Market Leader Will Be Owned Here!
+ +WE ARE GOING TO WIN THE MARKET! +

+

+ +# Tutorial Buka Toko + +:hand: Selamat datang di [Halaman Project](https://github.com/MarketLeader) untuk sesi [**Tutorial Buka Toko**](https://github.com/MarketLeader/Tutorial-Buka-Toko) + +Sesi ini adalah sesi tutorial publikasi dari +[**Tim Chetabahana**](https://github.com/chetabahana) diperuntukkan bagi yang sudah ikuti sesi sebelumnya yaitu: [_Cara Buka Toko Online WinMarket dan Optimasi Internal_](https://chetabahana.blogspot.com/) serta [_Cara Optimasi Eksternal Toko dengan Shop SEO_](https://chetabahana.wordpress.com/). + +Di sesi ini kami akan publikasikan [cara instalasi toko](https://github.com/MarketLeader/Tutorial-Buka-Toko/wiki) menggunakan aplikasi e-commerce dari [**Saleor**](https://github.com/mirumee/saleor). + +## Pilosopi +Pilosopi sederhananya bisa dijabarkan sesuai bagan dan alur kerja berikut dibawah ini: +[![flow_diagram](https://chetabahana.files.wordpress.com/2018/05/diagram.png)](https://chetabahana.github.io/#chetabahana-skema) +- Jalankan [Iklan Shopping di AdWords](https://chetabahana.wordpress.com/google-shopping/) untuk dapat data [_produk yang di rekomendasikan_](https://support.google.com/merchants/answer/6288242) via [Google Merchant](https://support.google.com/merchants/answer/188493). +- Kemudian dari [_peta situs toko_](https://chetabahana.com/sitemap.xml) kita saring [_daftar semua produk_](https://chetabahana.com/product?p=1&c=0&l=60) yang memenuhi kriteria via [Google AppEngine](https://github.com/MarketLeader/Tutorial-HelloWorld/wiki/Google-App-Engine). +- Hasilnya kita masukkan ke [Google Merchant](https://www.google.com/retail/solutions/merchant-center/) sehingga [_tersimpan menjadi database_](https://support.google.com/merchants/answer/7052112) via [Google Content API](https://developers.google.com/shopping-content/v2/quickstart). +- Dari database ini kita pilah lagi produk yang mempunyai hasil dan [_peluang terbaik_](https://support.google.com/merchants/answer/7228489?hl=id) via [Google AdWords API](https://developers.google.com/adwords/api/docs/guides/start). +- Selanjutnya kita tampilkan sebagai produk unggulan di [_Situs Toko dari Google Sites_](http://toko.chetabahana.com/) via [Google Sites API](https://developers.google.com/google-apps/sites/docs/developers_guide). + +## Manfaat +Manfaat yang bisa diperoleh adalah sbb: +- Menampilkan produk unggulan secara dinamis sesuai [Trend](https://support.google.com/adwords/answer/6325039?hl=id) dan [Rekomendasi](https://support.google.com/adwords/answer/3448398) di [Google AdWords](https://adwords.google.com/). +- Tidak memerlukan database karena bisa [_akses dan pakai data_](https://developers.google.com/shopping-content/v2/making-requests) yg sudah dimasukkan di Google Merchant +- Tidak perlukan hosting berbayar karena [Google Site](http://sites.google.com/) adalah Free dan [AppEngine](https://cloud.google.com/appengine/) bisa [_dijalankan secara gratis_](https://stackoverflow.com/questions/18101642/appengine-limit-the-number-of-instances/26654430#26654430). +- Bisa [_Jalankan SEO_](https://support.google.com/webmasters/answer/7451184) untuk produk unggulan dari [Situs Toko](https://chetabahana.com/) via [Google Site](http://toko.chetabahana.com/) untuk berkompetisi di [Google Search](https://www.google.com/search?q=chetabahana) +- Meraih data terkini untuk [_Update Setelan AdWords Secara Otomatis_](https://developers.google.com/adwords/api/docs/guides/start) guna peroleh sales return yang paling optimal. + +## Proses +Alur dari [_pilosopi_](#pilosopi) diatur sbb: +- [Proses ke-1](https://github.com/MarketLeader/Cloud-Site-API#proses): Pengelolaan hasil [_Optimasi Internal Toko_](https://developers.google.com/search/docs/guides/) sesuai dengan [_Publikasi Sesi yg Pertama_](https://chetabahana.blogspot.com/) via [Google Sites API](https://developers.google.com/google-apps/sites/docs/developers_guide). +- [Proses ke-2](https://github.com/MarketLeader/Cloud-Tasks-API#proses): Pendataan hasil [_Optimasi Eksternal_](https://support.google.com/webmasters/answer/40349) sesuai dengan [_Publikasi Sesi yg Kedua_](https://chetabahana.wordpress.com/) via [Google Content API](https://developers.google.com/shopping-content/v2/quickstart). +- [Proses ke-3](https://github.com/MarketLeader/Google-Ads-API#proses): Pendataan hasil [_Optimasi Promosi_](https://support.google.com/adwords/answer/3455573?hl=id) dari kinerja proses ke-1 dan -2 via [Google AdWords API](https://developers.google.com/adwords/api/docs/guides/start). +- [Proses ke-4](#struktur): Pengelolaan atas hasil [_Optimasi Penjualan_](https://support.google.com/adwords/answer/6167176) dari kinerja proses ke-3 via [Google AppEngine](https://cloud.google.com/appengine/). +

+Analisis iklan aneka produk fashion, sepatu, makanan dll dari Toko Online Chetabahana dari Google AdWordsGambar-1: Analisis pangsa tayang aneka produk Toko Online Chetabahana.com di Iklan Belanja dari Google AdWords +

+ +## Struktur +Struktur dari alur dijalankan dengan [_asas terbalik_](https://en.wikipedia.org/wiki/Algorithm) sbb: +``` +Proses ke-4: Google AppEngine (Top Directory) +|-----README.md (File yang kontennya sedang Anda baca ini) +|-----Proses ke-3: Google-Ads-API (Repo#3) + |----README.md + |----Proses ke-2: Cloud-Tasks-API (Repo#2) + |----README.md + |----Proses ke-1: Cloud-Site-API (Repo#1) + |----README.md +``` + +## Tujuan +Alur dari [_proses_](#proses) menuju [_manfaat_](#manfaat) diatur sbb: +- [Repo#1](https://github.com/MarketLeader/Cloud-Site-API#struktur): Mulai dari akses ke daftar produk, menyaring data sampai sunting untuk tampilkan produk. +- [Repo#2](https://github.com/MarketLeader/Cloud-Tasks-API#struktur): Mulai dari akses ke saran produk, memilah barang sampai input menjadi database produk. +- [Repo#3](https://github.com/MarketLeader/Google-Ads-API#struktur): Mulai dari akses ke database produk, kinerja penjualan sampai [optimasi setelan promosi](https://support.google.com/adwords). +- [Top Directory](#struktur): Mengatur konfigurasi, penjadwalan, lalu-lintas data, dan analisa hasil dari [setelan](https://chetabahana.github.io/feed.json). + +## Repositori +Hirarki dari Top Directory (Top_dir) disetel via [_remote_](https://git-scm.com/book/en/v2/Git-Basics-Working-with-Remotes) dari [_sumber_](https://github.com/MarketLeader/Tutorial-Buka-Toko/tree/master) ke Repositori ([_Repo_](https://help.github.com/articles/create-a-repo/)) sbb: +- Top_dir/Repo#3/Repo#1: [MarketLeader/Cloud-Site-API](https://github.com/MarketLeader/Cloud-Site-API) » Dokumentasi [_wiki_](https://help.github.com/articles/about-github-wikis/) nya [_disini_](https://github.com/MarketLeader/Cloud-Site-API/wiki). +- Top_dir/Repo#3/Repo#2: [MarketLeader/Cloud-Tasks-API](https://github.com/MarketLeader/Cloud-Tasks-API) » Dokumentasinya [_disini_](https://github.com/MarketLeader/Cloud-Tasks-API/wiki). +- Top_dir/Repo#3: [MarketLeader/Google-Ads-API](https://github.com/MarketLeader/Google-Ads-API) » Dokumentasinya [_disini_](https://github.com/MarketLeader/Google-Ads-API/wiki). +- Top_dir: [MarketLeader/Toko-Chetabahana](https://github.com/MarketLeader/Toko-Chetabahana) » Dokumentasinya [_disini_](https://github.com/MarketLeader/Toko-Chetabahana/wiki). + +Catatan: Nama Direktori bebas, akan dideteksi via masing² [_File README.md_](#struktur). ## License - -Disclaimer: Everything you see here is open and free to use as long as you comply with the [license](https://github.com/mirumee/saleor/blob/master/LICENSE). There are no hidden charges. We promise to do our best to fix bugs and improve the code. - -Some situations do call for extra code; we can cover exotic use cases or build you a custom e-commerce appliance. - -#### Crafted with ❤️ by [Mirumee Software](http://mirumee.com) - -hello@mirumee.com +[Creative Commons Attribution 4.0 International License](https://github.com/MarketLeader/Tutorial-Buka-Toko/blob/Chetabahana/LICENSE) +Original README dari [Mirumee Software](http://mirumee.com/) (Developer): [README_original.md](https://github.com/MarketLeader/Tutorial-Buka-Toko/blob/Chetabahana/README_original.md) +Developer Disclaimer: Everything you see [_here_](https://github.com/mirumee/saleor) is open and free to use as long as you comply with the [_license_](https://github.com/mirumee/saleor/blob/master/LICENSE). + +## Pustaka +

+Alokasi Pustaka Online ChetabahanaGambar-2: Alokasi Pustaka Online Chetabahana +

+ +Disarankan untuk disimak sebelum melangkah lebih jauh: +- [Cara Buka Toko Online WinMarket dan Optimasi Internal](https://chetabahana.blogspot.com/) +- [Cara Optimasi Eksternal Toko dengan Shop SEO](https://chetabahana.wordpress.com/) +- [Channel Youtube Chetabahana](https://www.youtube.com/channel/UCZlPku9beXzdROCknYLuRNg?view_as=subscriber) +- [e-Books Chetabahana](https://www.scribd.com/user/401259110/Chetabahana) + +## Penutup +Berikut ini beberapa catatan sebagai penutup: +- Projek ini diprioriostaskan bagi peminat [e-Commerce di Indonesia](https://www.youtube.com/watch?v=dd__L8Jh2c4&t=25s) 🇮🇩 +- Status masih [pengembangan dan pengetesan implementasi](https://github.com/MarketLeader/Toko-Chetabahana/releases). +- Syarat untuk bergabung silahkan [Daftar ID Chetabahana](https://www.chetabahana.com/layanan/mendaftarkan-produk.html) +- Ingin [berdonasi](https://notepad-plus-plus.org/donate/donate-action.html)? welcome untuk bergabung. + +Terimakasih atas kunjungannya. +Met menyimak.. :pray: + +SALAM Sukses! +[**Chetabahana Project**](https://github.com/MarketLeader) +[![profile for Chetabahana on Stack Exchange, a network of free, community-driven Q&A sites](https://stackexchange.com/users/flair/5054985.png)](https://stackoverflow.com/users/4058484/chetabahana?tab=profile) diff --git a/README_original.md b/README_original.md new file mode 100644 index 00000000000..cc9b8e9ad14 --- /dev/null +++ b/README_original.md @@ -0,0 +1,162 @@ +![Saleor Commerce - A GraphQL-first platform for perfectionists](https://user-images.githubusercontent.com/249912/71523206-4e45f800-28c8-11ea-84ba-345a9bfc998a.png) + +
+

Saleor Commerce

+
+ +
+ Customer-centric e-commerce on a modern stack +
+ +
+ A headless, GraphQL-first e-commerce platform delivering ultra-fast, dynamic, personalized shopping experiences. Beautiful online stores, anywhere, on any device. +
+ +
+ +
+ Join our active, engaged community:
+ Website + | + Blog + | + Twitter + | + Gitter + | + Spectrum +
+ +
+ +
+ + Build status + + + Codecov + + + Documentation + + + Code style: black + +
+ +## Table of Contents + +- [What makes Saleor special?](#what-makes-saleor-special) +- [Features](#features) +- [Installation](#installation) +- [Documentation](#documentation) +- [Demo](#demo) +- [Contributing](#contributing) +- [Translations](#translations) +- [Your feedback](#your-feedback) +- [License](#license) + +## What makes Saleor special? + +Saleor is a rapidly-growing open source e-commerce platform that has served high-volume companies from branches like publishing and apparel since 2012. Based on Python and Django, the latest major update introduces a modular front end powered by a GraphQL API and written with React and TypeScript. + +## Features + +- **PWA**: End users can shop offline for better sales and shopping experiences +- **GraphQL API**: Access all data from any web or mobile client using the latest technology +- **Headless commerce**: Build mobile apps, customize storefronts and externalize processes +- **UX and UI**: Designed for a user experience that rivals even the top commercial platforms +- **Dashboard**: Administrators have total control of users, processes, and products +- **Orders**: A comprehensive system for orders, dispatch, and refunds +- **Cart**: Advanced payment and tax options, with full control over discounts and promotions +- **Payments**: Flexible API architecture allows integration of any payment method. It comes with Braintree support out of the box. +- **Geo-adaptive**: Automatic localized pricing. Over 20 local languages. Localized checkout experience by country. +- **SEO**: Packed with features that get stores to a wider audience +- **Cloud**: Optimized for deployments using Docker +- **Analytics**: Server-side Google Analytics to report e-commerce metrics without affecting privacy + +Saleor is free and always will be. +Help us out… If you love free stuff and great software, give us a star! 🌟 + +![Saleor Storefront - React-based PWA e-commerce storefront](https://user-images.githubusercontent.com/249912/71527146-5b6be280-28da-11ea-901d-eb76161a6bfb.png) +![Saleor Dashboard - Modern UI for managing your e-commerce](https://user-images.githubusercontent.com/249912/71523261-8a795880-28c8-11ea-98c0-6281ea37f412.png) + +## Installation + +Saleor requires Python 3.8, Node.js 10.0+, PostgreSQL and OS-specific dependency tools. + +[See the Saleor docs](https://docs.saleor.io/docs/developer/installation) for step-by-step installation and deployment instructions. + +Note: +The `master` branch is the development version of Saleor and it may be unstable. To use the latest stable version, download it from the [Releases](https://github.com/mirumee/saleor/releases/) page or switch to a release tag. + +The current stable version is 2.10 and you should use this version for all three components: + +- Saleor: https://github.com/mirumee/saleor/releases/tag/2.10.1 +- Dashboard: https://github.com/mirumee/saleor-dashboard/releases/tag/2.10.0 +- Storefront: https://github.com/mirumee/saleor-storefront/releases/tag/2.10.3 + +## Documentation + +Saleor documentation is available here: [docs.saleor.io](https://docs.saleor.io) + +To contribute, please see the [`mirumee/saleor-docs` repository](https://github.com/mirumee/saleor-docs/). + +## Saleor Platform +The easiest way to run all components of Saleor (API, storefront and dashboard) together on your local machine is to use the [saleor-platform](https://github.com/mirumee/saleor-platform) project. Go to that repository for instructions on how to use it. + +[View saleor-platform](https://github.com/mirumee/saleor-platform) + +## Storefront + +For PWA, single-page storefront go to the [saleor-storefront](https://github.com/mirumee/saleor-storefront) repository. + +[View storefront demo](https://pwa.saleor.io/) + +## Dashboard + +For dashboard go to the [saleor-dashboard](https://github.com/mirumee/saleor-dashboard) repository. + +[View dashboard demo](https://pwa.saleor.io/dashboard/) + +## Demo + +Want to see Saleor in action? + +[View Storefront](https://pwa.saleor.io/) | [View Dashboard (admin area)](https://pwa.saleor.io/dashboard/) + +Or launch the demo on a free Heroku instance. + +[![Deploy](https://www.herokucdn.com/deploy/button.svg)](https://heroku.com/deploy) + +Login credentials: `admin@example.com`/`admin` + +## Contributing + +We love your contributions and do our best to provide you with mentorship and support. If you are looking for an issue to tackle, take a look at issues labeled [`Help Wanted`](https://github.com/mirumee/saleor/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22). + +If nothing grabs your attention, check [our roadmap](https://github.com/mirumee/saleor/projects/12) or come up with your feature. Just drop us a line or [open an issue](https://github.com/mirumee/saleor/issues/new) and we’ll work out how to handle it. + +Get more details in our [Contributing Guide](https://docs.saleor.io/docs/developer/community/contributing). + +## Legacy views + +If you're interested in using the old version of Saleor, go the [legacy-views](https://github.com/mirumee/legacy-views) repository. It contains the 2.9.0 release, which includes Django-based views and HTML templates of Storefront 1.0 and Dashboard 1.0. Note: this version of Saleor is no longer officially maintained. + + +## Your feedback + +Do you use Saleor as an e-commerce platform? +Fill out this short survey and help us grow. It will take just a minute, but mean a lot! + +[Take a survey](https://mirumee.typeform.com/to/sOIJbJ) + +## License + +Disclaimer: Everything you see here is open and free to use as long as you comply with the [license](https://github.com/mirumee/saleor/blob/master/LICENSE). There are no hidden charges. We promise to do our best to fix bugs and improve the code. + +Some situations do call for extra code; we can cover exotic use cases or build you a custom e-commerce appliance. + +#### Crafted with ❤️ by [Mirumee Software](http://mirumee.com) + +hello@mirumee.com diff --git a/poetry.lock b/poetry.lock index 8818a8bc22c..4f9e133acbb 100644 --- a/poetry.lock +++ b/poetry.lock @@ -409,7 +409,7 @@ description = "A high-level Python Web framework that encourages rapid developme name = "django" optional = false python-versions = ">=3.6" -version = "3.0.6" +version = "3.0.7" [package.dependencies] asgiref = ">=3.2,<4.0" @@ -2262,7 +2262,7 @@ idna = ">=2.0" multidict = ">=4.0" [metadata] -content-hash = "868f2a4f8684eabab0fd1efee3d3290eace6f74441c941b110761ed335b14e35" +content-hash = "ef9499a35e223e32aa2de8bf7ae46a20eb65c2563ab30c064baeec54c8ece092" python-versions = "~3.8" [metadata.files] @@ -2458,8 +2458,8 @@ dj-email-url = [ {file = "dj_email_url-1.0.1-py2.py3-none-any.whl", hash = "sha256:557c07b3039befdc1c561c4038b155d659c09f996d5e33c91189c2e23969da90"}, ] django = [ - {file = "Django-3.0.6-py3-none-any.whl", hash = "sha256:051ba55d42daa3eeda3944a8e4df2bc96d4c62f94316dea217248a22563c3621"}, - {file = "Django-3.0.6.tar.gz", hash = "sha256:9aaa6a09678e1b8f0d98a948c56482eac3e3dd2ddbfb8de70a868135ef3b5e01"}, + {file = "Django-3.0.7-py3-none-any.whl", hash = "sha256:e1630333248c9b3d4e38f02093a26f1e07b271ca896d73097457996e0fae12e8"}, + {file = "Django-3.0.7.tar.gz", hash = "sha256:5052b34b34b3425233c682e0e11d658fd6efd587d11335a0203d827224ada8f2"}, ] django-appconf = [ {file = "django-appconf-1.0.4.tar.gz", hash = "sha256:be58deb54a43d77d2e1621fe59f787681376d3cd0b8bd8e4758ef6c3a6453380"}, diff --git a/pyproject.toml b/pyproject.toml index 0d2330b1d4e..e5aed2d59f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,7 +19,7 @@ braintree = "~4.2.0" celery = { version = "^4.4.5", extras = ["redis"] } dj-database-url = "^0" dj-email-url = "^1" -django = "3.0.6" +django = "3.0.7" django-countries = "^6.1" django-filter = "^2.3" django-measurement = "^3.0" diff --git a/saleor/gunicorn.py b/saleor/gunicorn.py new file mode 100644 index 00000000000..a2c3a0bccca --- /dev/null +++ b/saleor/gunicorn.py @@ -0,0 +1,14 @@ +"""gunicorn WSGI server configuration.""" +from multiprocessing import cpu_count +from os import environ + + +def max_workers(): + return cpu_count() + + +bind = '0.0.0.0:' + environ.get('PORT', '8000') +max_requests = 10 +worker_class = 'gevent' +workers = max_workers() +timeout = 120 diff --git a/tests/test_update.py b/tests/test_update.py new file mode 100644 index 00000000000..76effd0e311 --- /dev/null +++ b/tests/test_update.py @@ -0,0 +1,18 @@ +from gittle import Gittle + +# Constants +repo_path = '/Users/aaron/git/gittle' +repo_url = 'git@github.com:MarketLeader/Toko-Chetabahana.git' +key_file = open('/root/.ssh/id_rsa') + +# Gittle repo +git = Gittle(repo_path, origin_uri=repo_url) + +# Authentication +git.status() +git.auth(pkey=key_file) +git.stage(git.modified_files) +git.commit(name="chetabahana",email="admin@chetabahana.com",message="update") + +# Do push +#git.push(remote=repo_url, branch='master')