mirror of
https://github.com/frappe/bench.git
synced 2025-02-12 23:58:25 +00:00
minor fixes
This commit is contained in:
parent
348e38f37a
commit
8a82f98eac
@ -5,7 +5,7 @@
|
||||
|
||||
[![Build Status](https://travis-ci.org/frappe/bench.svg?branch=master)](https://travis-ci.org/frappe/bench)
|
||||
|
||||
The bench is a command-line utility that helps you to install apps, manage multiple sites and update Frappe / ERPNext apps on */nix (CentOS 6, Debian 7, Ubuntu, etc) for development and production. Bench will also create nginx and supervisor config files, setup backups and much more.
|
||||
The bench is a command-line utility that helps you to install apps, manage multiple sites and update Frappe / ERPNext apps on */nix (CentOS, Debian, Ubuntu, etc) for development and production. Bench will also create nginx and supervisor config files, setup backups and much more.
|
||||
|
||||
If you are using on a VPS make sure it has >= 1Gb of RAM or has swap setup properly.
|
||||
|
||||
@ -83,7 +83,7 @@ Note: Please do not remove the bench directory the above commands will create
|
||||
## Easy Install
|
||||
|
||||
- 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.
|
||||
- Works on Ubuntu 16.04, CentOS 7+, Debian 8+
|
||||
- You may have to install Python 2.7 (eg on Ubuntu 16.04+) by running `apt-get install python-minimal`
|
||||
- You may also have to install build-essential and python-setuptools by running `apt-get install build-essential python-setuptools`
|
||||
- This script will install the pre-requisites, install bench and setup an ERPNext site
|
||||
|
@ -52,9 +52,12 @@ def setup_fonts():
|
||||
def setup_production(user, yes=False):
|
||||
"setup bench for production"
|
||||
from bench.config.production_setup import setup_production
|
||||
from bench.utils import run_playbook
|
||||
# Install prereqs for production
|
||||
exec_cmd("sudo pip install ansible")
|
||||
run_playbook('site.yml', tag='production')
|
||||
exec_cmd("bench setup role fail2ban")
|
||||
exec_cmd("bench setup role nginx")
|
||||
exec_cmd("bench setup role supervisor")
|
||||
setup_production(user=user, yes=yes)
|
||||
|
||||
|
||||
|
@ -124,7 +124,7 @@ def install_bench(args):
|
||||
shutil.rmtree(tmp_bench_repo)
|
||||
|
||||
def check_distribution_compatibility():
|
||||
supported_dists = {'ubuntu': [14, 15, 16], 'debian': [7, 8, 9],
|
||||
supported_dists = {'ubuntu': [15, 16], 'debian': [8, 9],
|
||||
'centos': [7], 'macos': [10.9, 10.10, 10.11, 10.12]}
|
||||
|
||||
dist_name, dist_version = get_distribution_info()
|
||||
|
@ -4,14 +4,12 @@
|
||||
url: https://keyserver.ubuntu.com/pks/lookup?op=get&fingerprint=on&search=0x1655A0AB68576280
|
||||
id: "68576280"
|
||||
state: present
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Add repo
|
||||
apt_repository:
|
||||
repo: "deb [arch=amd64,i386] https://deb.nodesource.com/node_8.x {{ ansible_distribution_release }} main"
|
||||
state: present
|
||||
register: node_repo
|
||||
when: ansible_os_family == 'Debian'
|
||||
|
||||
- name: Install nodejs 8.x
|
||||
apt:
|
||||
@ -19,5 +17,4 @@
|
||||
state: present
|
||||
update_cache: yes
|
||||
force: yes
|
||||
when: ansible_os_family == 'Debian'
|
||||
...
|
@ -5,22 +5,22 @@
|
||||
become: yes
|
||||
become_user: root
|
||||
roles:
|
||||
- { role: common, tags: "common" }
|
||||
- { role: locale, tags: "locale" }
|
||||
- { role: swap, tags: "swap", "production" when: production }
|
||||
- { role: logwatch, tags: "logwatch", "production" when: production }
|
||||
- { role: bash_screen_wall, tags: "bash_screen_wall", "production" when: production }
|
||||
- { role: frappe_selinux, tags: "frappe_selinux", "production" when: production }
|
||||
- { role: dns_caching, tags: "dns_caching", "production" when: production }
|
||||
- { role: ntpd, tags: "ntpd", "production" when: production }
|
||||
- { role: mariadb, tags: "mariadb" }
|
||||
- { role: wkhtmltopdf, tags: "wkhtmltopdf" }
|
||||
- { role: nodejs, tags: "nodejs" }
|
||||
- { role: psutil, tags: "psutil" }
|
||||
- { role: redis, tags: "redis" }
|
||||
- { role: supervisor, tags: "supervisor", "production" when: production }
|
||||
- { role: nginx, tags: "nginx", "production" when: production }
|
||||
- { role: fail2ban, tags: "fail2ban", "production" when: production }
|
||||
- { role: common, tags: common }
|
||||
- { role: locale, tags: locale }
|
||||
- { role: swap, tags: swap, when: production }
|
||||
- { role: logwatch, tags: logwatch, when: production }
|
||||
- { role: bash_screen_wall, tags: bash_screen_wall, when: production }
|
||||
- { role: frappe_selinux, tags: frappe_selinux, when: production }
|
||||
- { role: dns_caching, tags: dns_caching, when: production }
|
||||
- { role: ntpd, tags: ntpd, when: production }
|
||||
- { role: mariadb, tags: mariadb }
|
||||
- { role: wkhtmltopdf, tags: wkhtmltopdf }
|
||||
- { role: nodejs, tags: nodejs }
|
||||
- { role: psutil, tags: psutil }
|
||||
- { role: redis, tags: redis }
|
||||
- { role: supervisor, tags: supervisor, when: production }
|
||||
- { role: nginx, tags: nginx, when: production }
|
||||
- { role: fail2ban, tags: fail2ban, when: production }
|
||||
tasks:
|
||||
- name: Set hostname
|
||||
hostname: name='{{ hostname }}'
|
||||
|
Loading…
x
Reference in New Issue
Block a user