mirror of
https://github.com/frappe/bench.git
synced 2025-02-08 13:48:25 +00:00
parent
0cf0fefdac
commit
15e8568d43
69
README.md
69
README.md
@ -25,6 +25,7 @@ Install pre-requisites,
|
|||||||
* Python 2.7
|
* Python 2.7
|
||||||
* MariaDB
|
* MariaDB
|
||||||
* Redis
|
* Redis
|
||||||
|
* wkhtmltopdf (optional, required for pdf generation)
|
||||||
|
|
||||||
Install bench,
|
Install bench,
|
||||||
|
|
||||||
@ -67,6 +68,66 @@ Basic Usage
|
|||||||
bench start
|
bench start
|
||||||
|
|
||||||
|
|
||||||
|
Updating
|
||||||
|
========
|
||||||
|
|
||||||
|
On initializing a new bench, a cronjob is add to automatically update the bench
|
||||||
|
at 1000hrs (as per the time on your machine). You can disable this by running
|
||||||
|
`bench config auto_update off` and run `bench config auto_update on` to switch
|
||||||
|
it on again. To change the time of update, you will have to edit the cronjob
|
||||||
|
manually using `crontab -e`.
|
||||||
|
|
||||||
|
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)
|
||||||
|
|
||||||
|
Running the bench
|
||||||
|
==================
|
||||||
|
|
||||||
|
To run the bench,
|
||||||
|
|
||||||
|
*For development*: `bench start`
|
||||||
|
*For production*: Configure supervisor and nginx
|
||||||
|
|
||||||
|
To run the bench, a few services need to be running apart from the processes.
|
||||||
|
|
||||||
|
External services
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
* MariaDB (Datastore for frappe)
|
||||||
|
* Redis (Broker for frappe background workers)
|
||||||
|
* nginx (for production deployment)
|
||||||
|
* supervisor (for production deployment)
|
||||||
|
|
||||||
|
Frappe Processes
|
||||||
|
----------------
|
||||||
|
|
||||||
|
* WSGI Server
|
||||||
|
|
||||||
|
* The WSGI server is responsible for responding to the HTTP requests to
|
||||||
|
frappe. In development scenario (`frappe --serve` or `bench start`), the
|
||||||
|
Werkzeug WSGI server is used and in production, gunicorn (automatically
|
||||||
|
configured in supervisor) in used.
|
||||||
|
|
||||||
|
* Celery Worker Processes
|
||||||
|
|
||||||
|
* The Celery worker proceses execute background jobs in the Frappe system.
|
||||||
|
These processes are automatically started when `bench start` is run and
|
||||||
|
for production are conifgured in supervisor configuration.
|
||||||
|
|
||||||
|
* Celery Worker Beat Process
|
||||||
|
|
||||||
|
* The Celery worker beat process schedules enqueing of scheduled jobs in the
|
||||||
|
Frappe system. This process is automatically started when `bench start` is
|
||||||
|
run and for production are conifgured in supervisor configuration.
|
||||||
|
|
||||||
|
|
||||||
Production Deployment
|
Production Deployment
|
||||||
=====================
|
=====================
|
||||||
|
|
||||||
@ -95,7 +156,7 @@ 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
|
update the apps. To automate this, you will have to setup sudoers using the
|
||||||
command
|
command
|
||||||
|
|
||||||
`bench setup sudoers`
|
`sudo bench setup sudoers`
|
||||||
|
|
||||||
Nginx
|
Nginx
|
||||||
-----
|
-----
|
||||||
@ -112,3 +173,9 @@ eg,
|
|||||||
bench setup supervisor
|
bench setup supervisor
|
||||||
sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
|
sudo ln -s `pwd`/config/nginx.conf /etc/nginx/conf.d/frappe.conf
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Note: When you restart nginx after the configuration change, it might fail if
|
||||||
|
you have another configuration with server block as default for port 80 (in most
|
||||||
|
cases for the nginx welcome page). You will have disable this config. Most
|
||||||
|
probable places for it to exist are `/etc/nginx/conf.d/default.conf` and
|
||||||
|
`/etc/nginx/conf.d/default`.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user