• Stars
    star
    1,238
  • Rank 36,333 (Top 0.8 %)
  • Language
    Python
  • License
    GNU General Publi...
  • Created almost 10 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI to manage Multi-tenant deployments for Frappe apps

Bench

Bench is a command-line utility that helps you to install, update, and manage multiple sites for Frappe/ERPNext applications on *nix systems for development and production.

Table of Contents

Installation

A typical bench setup provides two types of environments β€” Development and Production.

The setup for each of these installations can be achieved in multiple ways:

We recommend using Docker Installation to setup a Production Environment. For Development, you may choose either of the two methods to setup an instance.

Otherwise, if you are looking to evaluate Frappe apps without hassle of hosting, you can try them on frappecloud.com.

Containerized Installation

A Frappe/ERPNext instance can be setup and replicated easily using Docker. The officially supported Docker installation can be used to setup either of both Development and Production environments.

To setup either of the environments, you will need to clone the official docker repository:

$ git clone https://github.com/frappe/frappe_docker.git
$ cd frappe_docker

A quick setup guide for both the environments can be found below. For more details, check out the Frappe/ERPNext Docker Repository.

Easy Install Script

The Easy Install script should get you going with a Frappe/ERPNext setup with minimal manual intervention and effort.

This script uses Docker with the Frappe/ERPNext Docker Repository and can be used for both Development setup and Production setup.

Setup

Download the Easy Install script and execute it:

$ wget https://raw.githubusercontent.com/frappe/bench/develop/easy-install.py
$ python3 easy-install.py --prod --email [email protected]

This script will install docker on your system and will fetch the required containers, setup bench and a default ERPNext instance.

The script will generate MySQL root password and an Administrator password for the Frappe/ERPNext instance, which will then be saved under $HOME/passwords.txt of the user used to setup the instance. It will also generate a new compose file under $HOME/<project-name>-compose.yml.

When the setup is complete, you will be able to access the system at http://<your-server-ip>, wherein you can use the Administrator password to login.

Arguments

Here are the arguments for the easy-install script

usage: easy-install.py [-h] [-p] [-d] [-s SITENAME] [-n PROJECT] [--email EMAIL]

Install Frappe with Docker

options:
  -h, --help            		show this help message and exit
  -p, --prod            		Setup Production System
  -d, --dev             		Setup Development System
  -s SITENAME, --sitename SITENAME      The Site Name for your production site
  -n PROJECT, --project PROJECT         Project Name
  --email EMAIL         		Add email for the SSL.

Troubleshooting

In case the setup fails, the log file is saved under $HOME/easy-install.log. You may then

  • Create an Issue in this repository with the log file attached.

Manual Installation

Some might want to manually setup a bench instance locally for development. To quickly get started on installing bench the hard way, you can follow the guide on Installing Bench and the Frappe Framework.

You'll have to set up the system dependencies required for setting up a Frappe Environment. Checkout docs/installation for more information on this. If you've already set up, install bench via pip:

$ pip install frappe-bench

Basic Usage

Note: Apart from bench init, all other bench commands are expected to be run in the respective bench directory.

  • Create a new bench:

    $ bench init [bench-name]
  • Add a site under current bench:

    $ bench new-site [site-name]
    • Optional: If the database for the site does not reside on localhost or listens on a custom port, you can use the flags --db-host to set a custom host and/or --db-port to set a custom port.

       $ bench new-site [site-name] --db-host [custom-db-host-ip] --db-port [custom-db-port]
  • Download and add applications to bench:

    $ bench get-app [app-name] [app-link]
  • Install apps on a particular site

    $ bench --site [site-name] install-app [app-name]
  • Start bench (only for development)

    $ bench start
  • Show bench help:

    $ bench --help

For more in-depth information on commands and their usage, follow Commands and Usage. As for a consolidated list of bench commands, check out Bench Usage.

Custom Bench Commands

If you wish to extend the capabilities of bench with your own custom Frappe Application, you may follow Adding Custom Bench Commands.

Guides

For an exhaustive list of guides, check out Bench Guides.

Resources

For an exhaustive list of resources, check out Bench Resources.

Development

To contribute and develop on the bench CLI tool, clone this repo and create an editable install. In editable mode, you may get the following warning everytime you run a bench command:

WARN: bench is installed in editable mode!

This is not the recommended mode of installation for production. Instead, install the package from PyPI with: `pip install frappe-bench`
$ git clone https://github.com/frappe/bench ~/bench-repo
$ pip3 install -e ~/bench-repo
$ bench src
/Users/frappe/bench-repo

To clear up the editable install and switch to a stable version of bench, uninstall via pip and delete the corresponding egg file from the python path.

# Delete bench installed in editable install
$ rm -r $(find ~ -name '*.egg-info')
$ pip3 uninstall frappe-bench

# Install latest released version of bench
$ pip3 install -U frappe-bench

To confirm the switch, check the output of bench src. It should change from something like $HOME/bench-repo to /usr/local/lib/python3.6/dist-packages and stop the editable install warnings from getting triggered at every command.

Releases

Bench's version information can be accessed via bench.VERSION in the package's init.py file. Eversince the v5.0 release, we've started publishing releases on GitHub, and PyPI.

GitHub: https://github.com/frappe/bench/releases

PyPI: https://pypi.org/project/frappe-bench

From v5.3.0, we partially automated the release process using @semantic-release. Under this new pipeline, we do the following steps to make a release:

  1. Merge develop into the staging branch
  2. Merge staging into the latest stable branch, which is v5.x at this point.

This triggers a GitHub Action job that generates a bump commit, drafts and generates a GitHub release, builds a Python package and publishes it to PyPI.

The intermediate staging branch exists to mediate the bench.VERSION conflict that would arise while merging develop and stable. On develop, the version has to be manually updated (for major release changes). The version tag plays a role in deciding when checks have to be made for new Bench releases.

Note: We may want to kill the convention of separate branches for different version releases of Bench. We don't need to maintain this the way we do for Frappe & ERPNext. A single branch named stable would sustain.

License

This repository has been released under the GNU GPLv3 License.

More Repositories

1

erpnext

Free and Open Source Enterprise Resource Planning (ERP)
Python
16,941
star
2

charts

Simple, responsive, modern SVG Charts with zero dependencies
JavaScript
14,870
star
3

frappe

Low code web framework for real world applications, in Python and Javascript
Python
6,484
star
4

gantt

Open Source Javascript Gantt
JavaScript
4,235
star
5

books

Free Accounting Software
TypeScript
2,585
star
6

frappe_docker

Docker images for production and development setups of the Frappe framework and ERPNext
Python
1,082
star
7

datatable

The Missing Javascript Datatable for the Web
JavaScript
953
star
8

hrms

Open Source HR and Payroll Software
Python
698
star
9

lms

Easy to Use, 100% Open Source Learning Management System
JavaScript
611
star
10

helpdesk

Modern, Streamlined, Free and Open Source Customer Service Software
Vue
416
star
11

insights

Open source analytics / business intelligence tool (BI)
Vue
313
star
12

frappejs

Node + Electron + Vue based metadata web framework (inspired by Frappe)
JavaScript
263
star
13

gameplan

Delightful, open-source, work communication tool for remote teams
Python
249
star
14

health

Open Source Health Information System
Python
248
star
15

builder

Modern website builder for modern web pages
Vue
221
star
16

mobile

Mobile App for Frappe built on Flutter
Dart
220
star
17

press

Full service cloud hosting for the Frappe stack - powers Frappe Cloud
Python
202
star
18

frappe-ui

A set of components and utilities for rapid UI development
Vue
199
star
19

drive

[beta] An easy to use, document sharing and management solution.
Vue
193
star
20

wiki

Free and Open Source Wiki built on top of Frappe
Python
182
star
21

print_designer

Visual print designer for Frappe / ERPNext
Vue
159
star
22

biometric-attendance-sync-tool

A simple tool for syncing Biometric Attendance data with your ERPNext server
Python
158
star
23

helm

Helm Chart Repository for Frappe/ERPNext
Python
114
star
24

crm

Free and Open Source CRM Solution to supercharge your sales operations
Vue
105
star
25

frappe-client

Python library to use Frappe API
Python
101
star
26

chat

Modern Chat App for Frappe
JavaScript
99
star
27

ecommerce_integrations

Ecommerce integrations for ERPNext
Python
93
star
28

education

Open source education / school ERP system.
Python
82
star
29

bench_manager

Frappe app for managing bench
Python
67
star
30

payments

A payments app for frappe
Python
65
star
31

cordova-wrapper

Mobile App Container (Cordova) for FrappΓ©/ERPNext
CSS
64
star
32

erpnext_documentation

[DEPRECATED] ERPNext User Documentation. Please don't raise new contributions here.
HTML
63
star
33

changemakers

Beneficiary Management Platform, built on Frappe Framework.
Vue
62
star
34

webshop

Open Source eCommerce Platform
Python
60
star
35

lending

Open Source Lending software
Python
59
star
36

erpnext-shipping

A Shipping Integration for ERPNext
Python
57
star
37

twilio-integration

Twilio integration for ERPNext
Python
55
star
38

agent

Works with https://github.com/frappe/press
Python
53
star
39

frappe_io

Website for Frappe
JavaScript
50
star
40

nextcloud-integration

Frappe App for NextCloud Integration
Python
48
star
41

intellisense

VSCode Extension and Language Server for Frappe Framework
Python
48
star
42

video

Node.js based library for automated video creation
JavaScript
48
star
43

erpnext_com

erpnext.com website
HTML
47
star
44

waba_integration

WhatsApp Bussiness Cloud API integration for Frappe
Python
46
star
45

pesa

A JS money lib whose precision goes up to 11 (and beyond).
TypeScript
43
star
46

frappe_docs

[DEPRECATED] Frappe Framework Documentation. Please don't raise new contributions here.
Python
43
star
47

schools

Merged with frappe/erpnext - this repo is deprecated
HTML
42
star
48

agriculture

Agriculture Domain for ERPNext
Python
36
star
49

hospitality

Hospitality app for ERPNext to manage hotels & restaurants.
Python
35
star
50

semgrep-rules

Semgrep rules specific to Frappe Framework
Python
33
star
51

non_profit

Non Profit module for Frappe/ERPNext
Python
32
star
52

design

🎨 Elements and source files of design resources used in products of frappe technologies
HTML
32
star
53

meeting

Prepare agenda, invite users and record minutes of a meeting
HTML
31
star
54

frappe_theme

Theme for Frappe sites
JavaScript
30
star
55

fonts

29
star
56

translator

Translation Portal for Frappe
Python
27
star
57

simple-bootstrap-editor

Simple Bootstrap themed HTML5 WYSIWYG editor
JavaScript
24
star
58

erpnext_shopify

[Deprecated] Shopify connector for ERPNext
Python
22
star
59

event_streaming

Event Streaming for frappe
Python
22
star
60

hub

Python
21
star
61

storage_integration

Python
18
star
62

vidya

Open Source, Open Data Chat Bot
Python
18
star
63

data-gov-in

A better visualisation of data.gov.in
Python
18
star
64

panoptic

Frappe App for Project Panoptic
HTML
17
star
65

email_delivery_service

Python
16
star
66

paypal_integration

Paypal API Integrations
HTML
16
star
67

erpnext_ui_tests

This repository contains Integration tests for ERPNext features written in Cypress. These tests are run on GitHub Actions via cron every day.
JavaScript
15
star
68

library_management

Library Management App
Python
15
star
69

assets

Asset Management app for ERPNext
Python
14
star
70

shopping_cart

Online Shopping Cart integrated with ERPNext
Python
14
star
71

razorpay_integration

Rajorpay integration with Frappe/ERPNext
Python
13
star
72

erpnext_gst_compliance

Manage GST Compliance for ERPNext
Python
12
star
73

chart_of_accounts_builder

Python
12
star
74

odoo_to_erpnext

Migrate your Odoo database to ERPNext
Python
12
star
75

manual_erpnext_com

Abandoned. Moved to: https://github.com/frappe/erpnext/tree/develop/erpnext/docs
HTML
11
star
76

mobile-accounting

Accounting app for mobile with frappejs-accounting as backend
TypeScript
11
star
77

frappejs-cli

Command Line Interface (CLI) for FrappeJS
JavaScript
11
star
78

ui

A "batteries included" front-end framework for ones with deadlines.
JavaScript
11
star
79

iff

Membership automation for the Internet Freedom Foundation ❀️
Python
10
star
80

erpnext-vm

Configuration for the Build Server that generates ERPNext VMs and Vagrant Box
Python
10
star
81

poll

Online Polling App
Python
9
star
82

frappekt

Kotlin
9
star
83

exotel_integration

Exotel Integration for ERPNext
Python
9
star
84

frappejs-accounting

Mono repo for frappejs and accounting
8
star
85

books-website

Website for Frappe Books
Vue
7
star
86

erpnext_vagrant

Vagrantfile and Bootstrap for creating a dev environment for ERPNext
Shell
7
star
87

frappe-ui-rn

frappe-ui-rn
TypeScript
7
star
88

bhumi-awards-portal

Awards Portal web app for Bhumi NGO.
HTML
7
star
89

release

Application to manage releases for Frappe and Frappe Applications
Python
7
star
90

ijr

India Justice Report ranks 18 large and 7 small states according to their capacity to deliver justice to all
HTML
7
star
91

frappe.io

New Frappe.io
Vue
6
star
92

community_erpnext_com

community.erpnext.com [discontinued]
HTML
6
star
93

tagger

A simple Flask app to automatically label GitHub PRs.
Python
6
star
94

frappe-pr-bot

Your friendly neighborhood bot
JavaScript
6
star
95

kyg

Know Your Government (India)
JavaScript
5
star
96

css

CSS framework for frappe
CSS
5
star
97

taxjar_integration

Python
5
star
98

knowledge_base

[Merged in Frappe Framework Core]
Python
5
star
99

mobile-apk

Android apk file for non-Google Androids
5
star
100

frappe_support

JavaScript
5
star