Coder Social home page Coder Social logo

bench's Introduction

Bench

The bench allows you to setup Frappe / ERPNext apps on your local Linux (CentOS 6, Debian 7, Ubuntu, etc) machine or a production server. You can use the bench to serve multiple frappe sites. If you are using a DigitalOcean droplet or any other VPS / Dedicated Server, make sure it has >= 1Gb of ram or has swap setup properly.

To do this install, you must have basic information on how Linux works and should be able to use the command-line. If you are looking easier ways to get started and evaluate ERPNext, download the Virtual Machine or take a free trial on erpnext.com.

If you have questions, please ask them on our forum.

Installation

Production Setup Development Setup
Installs with master branch Installs with develop branch
The Production setup uses Nginx, and uses Supervisor to manage processes The development setup uses Honcho to manage processes (bench start)
This setup isn't meant for instant updates in code. Any code changes will be reflected instantly.
Background services handle all the work, and they start with the system. You need to explicitly start your server
Uses Celery for job queuing (Frappe 6) Uses RQ for job queuing (Frappe 7)

Easy Setup

  • This is an opinionated setup with logging and SE Linux. So, it is best to setup on a blank server.
  • Supported for CentOS 6, CentOS 7, Debian 7 and Ubuntu 12.04 to 15.x
  • This script will install the pre-requisites, install bench and setup an ERPNext site
  • Passwords for Frappe, Frappe Administrator and MariaDB (root) will be generated
  • You can then login as Administrator with the Administrator password printed

Open your Terminal and enter:

####For Production:

Mac OSX:
curl "https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh" -o "setup_frappe.sh"

Linux: 
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh

sudo bash setup_frappe.sh --setup-production

####For Development:

We recommend using the Beta Development Setup if it supports your OS

Mac OSX:
curl "https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh" -o "setup_frappe.sh"

Linux: 
wget https://raw.githubusercontent.com/frappe/bench/master/install_scripts/setup_frappe.sh
sudo bash setup_frappe.sh --bench-branch develop

You have to explicitly start services by running bench start.

####Script Options:

	-h | --help 
	-v | --verbose 
	--mysql-root-password 
	--frappe-user 
	--setup-production 
	--skip-setup-bench 
	--skip-install-bench 

Beta Development Setup

Tested on Ubuntu 14.04 to 15.x, Debian 7+, CentOS 7+, and MacOS X. If you find any problems, post them on our forum: https://discuss.erpnext.com

Linux: 
wget https://raw.githubusercontent.com/frappe/bench/develop/playbooks/install.py

Mac OSX:
curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py

python install.py --develop

You have to explicitly start services by running bench start. This script requires Python2.7+ installed on your machine. You need to run this with a user that is not root, but can sudo. If you don't have such a user, you can search the web for How to add a new user in { your OS } and How to add an existing user to sudoers in { your OS }.

On Mac OS X, you will have to create a group with the same name as { your User }. On creating this group, you have to assign { your User } to it. You can do this by going to "System preferences" -> "Users & Groups" -> "+" (as if you were adding new account) -> Under "New account" select "Group" -> Type in group name -> "Create group"

This script will:

  • Install pre-requisites like git and ansible
  • Shallow clones this bench repository under /usr/local/frappe/bench-repo
  • Runs the Ansible playbook 'playbooks/develop/install.yml', which:
    • Installs
      • MariaDB and its config
      • Redis
      • NodeJS
      • WKHTMLtoPDF with patched QT
    • Initializes a new Bench at ~/frappe/frappe-bench with frappe framework already installed under apps.

You will have to manually create a new site (bench new-site) and get apps that you need (bench get-app, bench install-app).

Updating

To manually update the bench, run bench update to update all the apps, run patches, build JS and CSS files and restart supervisor (if configured to).

You can also run the parts of the bench selectively.

bench update --pull will only pull changes in the apps

bench update --patch will only run database migrations in the apps

bench update --build will only build JS and CSS files for the bench

bench update --bench will only update the bench utility (this project)

bench update --requirements will only update dependencies (python packages) for the apps installed

Guides

Resources

bench's People

Contributors

adamtangx avatar anandpdoshi avatar itsdaveit avatar itsraichura avatar kressi avatar loader-bsd avatar mgedmin avatar mgirard85 avatar nabinhait avatar pdvyas avatar revant avatar rmehta avatar saurabh6790 avatar sbkolate avatar tillkruss avatar venetanji avatar vjfalk avatar williamjmorenor avatar yashodhank avatar

Watchers

 avatar

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.