mirror of
https://github.com/frappe/bench.git
synced 2024-11-11 15:51:03 +00:00
fix readme
This commit is contained in:
parent
164bc13c95
commit
693d06252f
131
README.md
131
README.md
@ -1,5 +1,6 @@
|
||||
Bench [![Build Status](https://travis-ci.org/frappe/bench.svg?branch=master)](https://travis-ci.org/frappe/bench)
|
||||
=====
|
||||
# Bench
|
||||
|
||||
[![Build Status](https://travis-ci.org/frappe/bench.svg?branch=master)](https://travis-ci.org/frappe/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.
|
||||
|
||||
@ -7,13 +8,12 @@ To do this install, you must have basic information on how Linux works and shoul
|
||||
|
||||
If you have questions, please ask them on our [forum](https://discuss.erpnext.com/).
|
||||
|
||||
Installation
|
||||
============
|
||||
## Installation
|
||||
|
||||
Easy Setup
|
||||
----------
|
||||
|
||||
- This is an opinionated setup with logging and SE Linux. So, it is best to setup on a blank server.
|
||||
- This is an opinionated setup so it is best to setup on a blank server.
|
||||
- Works on Ubuntu 14.04 to 16.04, CentOS 7+, Debian 7 to 8 and MacOS X.
|
||||
- You may have to install Python 2.7 (eg on Ubuntu 16.04+) by running `apt-get install python-minimal`
|
||||
- This script will install the pre-requisites, install bench and setup an ERPNext site
|
||||
@ -21,16 +21,77 @@ Easy Setup
|
||||
- You can then login as **Administrator** with the Administrator password
|
||||
- If you find any problems, post them on our forum: [https://discuss.erpnext.com](https://discuss.erpnext.com)
|
||||
|
||||
Production vs Develop
|
||||
---------------------
|
||||
## Manual Install
|
||||
|
||||
*Production* setup should be run on a new box and installs nginx and supervisor to manage the processes. *Develop* setup uses `honcho` to manage the processes and uses the built-in web server (`bench start`)
|
||||
To manually install frappe/erpnext here are the steps
|
||||
|
||||
#### 1. Install Pre-requisites
|
||||
|
||||
- Python 2.7
|
||||
- MariaDB 10+
|
||||
- Nginx (for production)
|
||||
- Nodejs
|
||||
- Redis
|
||||
- wkhtmltopdf (for pdf generation)
|
||||
|
||||
#### 2. Install Bench
|
||||
|
||||
Install bench as a *non root* user,
|
||||
|
||||
git clone https://github.com/frappe/bench bench-repo
|
||||
sudo pip install -e bench-repo
|
||||
|
||||
Note: Please do not remove the bench directory the above commands will create
|
||||
|
||||
#### Basic Usage
|
||||
|
||||
* Create a new bench
|
||||
|
||||
The init command will create a bench directory with frappe framework
|
||||
installed. It will be setup for periodic backups and auto updates once
|
||||
a day.
|
||||
|
||||
bench init frappe-bench && cd frappe-bench
|
||||
|
||||
* Add apps
|
||||
|
||||
The get-app command gets remote frappe apps from a remote git repository and installs it. Example: [erpnext](https://github.com/frappe/erpnext)
|
||||
|
||||
bench get-app erpnext https://github.com/frappe/erpnext
|
||||
|
||||
* Add site
|
||||
|
||||
Frappe apps are run by frappe sites and you will have to create at least one
|
||||
site. The new-site command allows you to do that.
|
||||
|
||||
bench new-site site1.local
|
||||
|
||||
* Install erpnext
|
||||
|
||||
To install erpnext on your new site, use the bench `install-app` command
|
||||
|
||||
bench --site site1.local install-app erpnext
|
||||
|
||||
* Start bench
|
||||
|
||||
To start using the bench, use the `bench start` command
|
||||
|
||||
bench start
|
||||
|
||||
To login to Frappe / ERPNext, open your browser and go to `localhost:8000`
|
||||
|
||||
The default user name is "Administrator" and password is what you set when you created the new site.
|
||||
|
||||
|
||||
---
|
||||
|
||||
## Easy Install
|
||||
|
||||
Steps
|
||||
-----
|
||||
|
||||
Open your Terminal and enter:
|
||||
|
||||
#### 1. Download the install script
|
||||
|
||||
# Linux:
|
||||
|
||||
wget https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py
|
||||
@ -43,47 +104,40 @@ Open your Terminal and enter:
|
||||
brew install git
|
||||
curl "https://raw.githubusercontent.com/frappe/bench/master/playbooks/install.py" -o install.py
|
||||
|
||||
# For development
|
||||
#### 2. Run the install script
|
||||
|
||||
For development:
|
||||
|
||||
sudo python install.py --develop
|
||||
|
||||
# For production
|
||||
For production:
|
||||
|
||||
sudo python install.py --production
|
||||
|
||||
# If you're logged in as root, use --user flag to create a user and install using that user
|
||||
If you're logged in as root, use --user flag to create a user and install using that user
|
||||
|
||||
sudo python install.py --develop --user frappe
|
||||
|
||||
#### What will this script do?
|
||||
|
||||
For development, you have to explicitly start services by running `bench start`. This script requires Python2.7+ installed on your machine. You will have to manually create a new site (`bench new-site`) and get apps that you need (`bench get-app`, `bench install-app`).
|
||||
- Install all the pre-requisites
|
||||
- Install the command line `bench`
|
||||
- Create a new bench (a folder that will contain your entire frappe/erpnext setup)
|
||||
- Create a new site on the bench
|
||||
|
||||
For production, you will have a preinstalled site with ERPNext installed in it.
|
||||
#### How do I start ERPNext
|
||||
|
||||
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 }*.
|
||||
1. For development: Go to your bench folder (`frappe-bench` by default) and start the bench with `bench start`
|
||||
2. For production: Your process will be setup and managed by `nginx` and `supervisor`. [Setup Production](https://frappe.github.io/frappe/user/en/bench/guides/setup-production.html)
|
||||
|
||||
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:
|
||||
Help
|
||||
====
|
||||
|
||||
- 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`.
|
||||
For bench help, you can type
|
||||
|
||||
####Script Options:
|
||||
```
|
||||
--help
|
||||
--verbose
|
||||
--develop
|
||||
--production
|
||||
--site
|
||||
--user
|
||||
--bench-branch
|
||||
--repo-url
|
||||
```
|
||||
bench --help
|
||||
|
||||
Updating
|
||||
========
|
||||
@ -103,7 +157,6 @@ You can also run the parts of the bench selectively.
|
||||
|
||||
`bench update --requirements` will only update dependencies (python packages) for the apps installed
|
||||
|
||||
|
||||
Guides
|
||||
=======
|
||||
- [Configuring HTTPS](https://frappe.github.io/frappe/user/en/bench/guides/configuring-https.html)
|
||||
|
Loading…
Reference in New Issue
Block a user