mirror of
https://github.com/frappe/bench.git
synced 2025-01-09 08:30:39 +00:00
Update Readme
This commit is contained in:
parent
0ad9189155
commit
ddeaa6d29e
71
README.md
71
README.md
@ -16,26 +16,77 @@ Hard Way
|
|||||||
|
|
||||||
Install pre-requisites,
|
Install pre-requisites,
|
||||||
|
|
||||||
* Python 2.7
|
* Python 2.7
|
||||||
* MariaDB
|
* MariaDB
|
||||||
* Redis
|
* Redis
|
||||||
|
|
||||||
Install bench,
|
Install bench,
|
||||||
|
|
||||||
`sudo pip install git+https://github.com/frappe/bench`
|
sudo pip install git+https://github.com/frappe/bench
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Basic Usage
|
||||||
=====
|
===========
|
||||||
|
|
||||||
* Create a new bench
|
* Create a new bench
|
||||||
`bench init erpnext-bench && cd erpnext-bench`
|
|
||||||
|
bench init erpnext-bench && cd erpnext-bench
|
||||||
|
|
||||||
* Add apps
|
* Add apps
|
||||||
`bench get-app erpnext https://github.com/frappe/erpenxt`
|
|
||||||
|
bench get-app erpnext https://github.com/frappe/erpenxt
|
||||||
|
|
||||||
* Add site
|
* Add site
|
||||||
`bench new-site site1.local`
|
|
||||||
|
bench new-site site1.local
|
||||||
|
|
||||||
* Serve site
|
* Serve site
|
||||||
`bench frappe --serve`
|
|
||||||
|
bench frappe --serve
|
||||||
|
|
||||||
|
|
||||||
|
Production Deployment
|
||||||
|
=====================
|
||||||
|
|
||||||
|
|
||||||
|
You can setup the bench for production use by configuring two programs,
|
||||||
|
Supervisor and nginx.
|
||||||
|
|
||||||
|
Supervisor
|
||||||
|
----------
|
||||||
|
|
||||||
|
Supervisor makes sure that the process that power the Frappe system keep running
|
||||||
|
and it restarts them if they happen to crash. You can generate the required
|
||||||
|
configuration for supervisor using the command `bench setup supervisor`. The
|
||||||
|
configuration will be available in `config/supervisor.conf` directory. You can
|
||||||
|
then copy/link this file to the supervisor config directory and reload it for it to
|
||||||
|
take effect.
|
||||||
|
|
||||||
|
eg,
|
||||||
|
|
||||||
|
```
|
||||||
|
bench setup supervisor
|
||||||
|
sudo ln -s `pwd`/config/supervisor.conf /etc/supervisor/conf.d/frappe.conf
|
||||||
|
```
|
||||||
|
|
||||||
|
The bench will also need to restart the processes managed by supervisor when you
|
||||||
|
update the apps. To automate this, you will have to setup sudoers using the
|
||||||
|
command
|
||||||
|
|
||||||
|
`bench setup sudoers`
|
||||||
|
|
||||||
|
Nginx
|
||||||
|
-----
|
||||||
|
|
||||||
|
Nginx is a web server and we use it to serve static files and proxy rest of the
|
||||||
|
requests to frappe. You can generate the required configuration for nginx using
|
||||||
|
the command `bench setup nginx`. The configuration will be available in
|
||||||
|
`config/nginx.conf` file. You can then copy/link this file to the nginx config
|
||||||
|
directory and reload it for it to take effect.
|
||||||
|
|
||||||
|
eg,
|
||||||
|
|
||||||
|
```
|
||||||
|
bench setup supervisor
|
||||||
|
sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
|
||||||
|
```
|
||||||
|
Loading…
Reference in New Issue
Block a user