mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 09:02:10 +00:00
Merge branch 'master' into develop
This commit is contained in:
commit
4a9933f8ae
61
README.md
61
README.md
@ -10,17 +10,32 @@ If you have questions, please ask them on our [forum](https://discuss.erpnext.co
|
||||
Installation
|
||||
============
|
||||
|
||||
Production vs Development
|
||||
--------------------
|
||||
|
||||
| Production | Development |
|
||||
|--------------------------------------------------------------------------|-------------------------------------------------------------------|
|
||||
| The Production setup uses Nginx and Supervisor | The development setup uses Socketio. |
|
||||
| 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 by running `bench start` |
|
||||
| Uses Celery for job queuing | Uses RQ for queuing |
|
||||
| Installs with master branch | Installs with develop branch |
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th width=50%>Production Setup</th>
|
||||
<th width=50%>Development Setup</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Installs with master branch</td>
|
||||
<td>Installs with develop branch</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>The Production setup uses Nginx, and uses Supervisor to manage processes</td>
|
||||
<td>The development setup uses Honcho to manage processes (bench start)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>This setup isn't meant for instant updates in code.</td>
|
||||
<td>Any code changes will be reflected instantly.</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Background services handle all the work, and they start with the system.</td>
|
||||
<td>You need to explicitly start your server</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Uses Celery for job queuing (Frappe 6)</td>
|
||||
<td>Uses RQ for job queuing (Frappe 7)</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
Easy Setup
|
||||
---------------------
|
||||
@ -34,20 +49,29 @@ 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
|
||||
```
|
||||
This will install Frappe and ERPNext with Supervisor, Nginx and Celery. Supervisor will keep all services working in the background and make sure they all run.
|
||||
|
||||
####For Development:
|
||||
> We recommend using the [Beta Development Setup](#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
|
||||
```
|
||||
This will install with Socketio and Redis Queue. You have to explicitly start services by running `bench start`.
|
||||
You have to explicitly start services by running `bench start`.
|
||||
|
||||
####Script Options:
|
||||
```
|
||||
@ -67,10 +91,17 @@ 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](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
|
||||
```
|
||||
This will install with Socketio and Redis Queue. 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 }*.
|
||||
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:
|
||||
|
||||
@ -103,6 +134,8 @@ You can also run the parts of the bench selectively.
|
||||
|
||||
`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
|
||||
=======
|
||||
|
@ -155,7 +155,7 @@ def get_current_version(app, bench='.'):
|
||||
except AttributeError:
|
||||
# backward compatibility
|
||||
with open(os.path.join(repo_dir, 'setup.py')) as f:
|
||||
return get_version_from_string(f.read())
|
||||
return get_version_from_string(f.read(), field='version')
|
||||
|
||||
def get_upstream_version(app, branch=None, bench='.'):
|
||||
repo_dir = get_repo_dir(app, bench=bench)
|
||||
@ -240,8 +240,8 @@ def switch_to_v4(apps=None, bench='.', upgrade=False):
|
||||
def switch_to_v5(apps=None, bench='.', upgrade=False):
|
||||
switch_branch('v5.x.x', apps=apps, bench=bench, upgrade=upgrade)
|
||||
|
||||
def get_version_from_string(contents):
|
||||
match = re.search(r"^(\s*%s\s*=\s*['\\\"])(.+?)(['\"])(?sm)" % '__version__',
|
||||
def get_version_from_string(contents, field='__version__'):
|
||||
match = re.search(r"^(\s*%s\s*=\s*['\\\"])(.+?)(['\"])(?sm)" % field,
|
||||
contents)
|
||||
return match.group(2)
|
||||
|
||||
|
@ -212,11 +212,14 @@ install_packages() {
|
||||
supervisor python-pip fontconfig libxrender1 libxext6 xfonts-75dpi xfonts-base nodejs
|
||||
|
||||
if [ $OS_VER == "precise" ]; then
|
||||
run_cmd sudo apt-get install -y libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
|
||||
run_cmd sudo apt-get install -y libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev \
|
||||
liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
|
||||
elif [ $OS_VER == "8" ]; then
|
||||
run_cmd sudo apt-get install -y libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
|
||||
run_cmd sudo apt-get install -y libtiff5-dev libjpeg62-turbo-dev zlib1g-dev libfreetype6-dev \
|
||||
liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk npm
|
||||
else
|
||||
run_cmd sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
|
||||
run_cmd sudo apt-get install -y libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev \
|
||||
liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk
|
||||
fi
|
||||
|
||||
echo "Installing wkhtmltopdf"
|
||||
|
Loading…
Reference in New Issue
Block a user