2
0
mirror of https://github.com/frappe/bench.git synced 2024-11-12 00:06:36 +00:00

Merge branch 'develop' into patch-6

This commit is contained in:
gavin 2020-10-30 16:21:04 +05:30 committed by GitHub
commit a951557800
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 24 additions and 6 deletions

13
.github/semantic.yml vendored Normal file
View File

@ -0,0 +1,13 @@
# Always validate the PR title AND all the commits
titleAndCommits: true
# Allow use of Merge commits (eg on github: "Merge branch 'master' into feature/ride-unicorns")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowMergeCommits: true
# Allow use of Revert commits (eg on github: "Revert "feat: ride unicorns"")
# this is only relevant when using commitsOnly: true (or titleAndCommits: true)
allowRevertCommits: true
# For allowed PR types: https://github.com/commitizen/conventional-commit-types/blob/v3.0.0/index.json
# Tool Reference: https://github.com/zeke/semantic-pull-requests

View File

@ -55,7 +55,7 @@ def get_gunicorn_workers():
'''This function will return the maximum workers that can be started depending upon '''This function will return the maximum workers that can be started depending upon
number of cpu's present on the machine''' number of cpu's present on the machine'''
return { return {
"gunicorn_workers": multiprocessing.cpu_count() "gunicorn_workers": multiprocessing.cpu_count() * 2 + 1
} }
def update_config_for_frappe(config, bench_path): def update_config_for_frappe(config, bench_path):

View File

@ -13,16 +13,17 @@
- name: Check whether the site already exists - name: Check whether the site already exists
stat: path="{{ bench_path }}/sites/{{ site }}" stat: path="{{ bench_path }}/sites/{{ site }}"
register: site_folder register: site_folder
when: not without_site
- name: Create a new site - name: Create a new site
command: "bench new-site {{ site }} --admin-password '{{ admin_password }}' --mariadb-root-password '{{ mysql_root_password }}'" command: "bench new-site {{ site }} --admin-password '{{ admin_password }}' --mariadb-root-password '{{ mysql_root_password }}'"
args: args:
chdir: "{{ bench_path }}" chdir: "{{ bench_path }}"
when: not site_folder.stat.exists when: not without_site and not site_folder.stat.exists
- name: Install ERPNext to default site - name: Install ERPNext to default site
command: "bench --site {{ site }} install-app erpnext" command: "bench --site {{ site }} install-app erpnext"
args: args:
chdir: "{{ bench_path }}" chdir: "{{ bench_path }}"
when: not without_erpnext when: not without_site and not without_erpnext
... ...

View File

@ -48,6 +48,10 @@
[mysqld] [mysqld]
pid-file = /var/run/mysqld/mysqld.pid pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock socket = /var/run/mysqld/mysqld.sock
# setting appeared inside mysql but overwritten by mariadb inside mariadb.conf.d/xx-server.cnf valued as utf8mb4_general_ci
collation-server = utf8mb4_unicode_ci
create: yes create: yes
become: yes become: yes
become_user: root become_user: root

View File

@ -171,7 +171,7 @@ def install_prerequisites():
install_package('pip3', 'python3-pip') install_package('pip3', 'python3-pip')
success = run_os_command({ success = run_os_command({
'python3': "sudo -H python3 -m pip install --upgrade setuptools wheel cryptography ansible==2.8.5 pip" 'python3': "sudo -H python3 -m pip install --upgrade setuptools wheel cryptography ansible~=2.8.15 pip"
}) })
if not (success or shutil.which('ansible')): if not (success or shutil.which('ansible')):
@ -335,8 +335,8 @@ def get_passwords(args):
mysql_root_password = '' mysql_root_password = ''
continue continue
# admin password # admin password, only needed if we're also creating a site
if not admin_password: if not admin_password and not args.without_site:
admin_password = getpass.unix_getpass(prompt='Please enter the default Administrator user password: ') admin_password = getpass.unix_getpass(prompt='Please enter the default Administrator user password: ')
conf_admin_passswd = getpass.unix_getpass(prompt='Re-enter Administrator password: ') conf_admin_passswd = getpass.unix_getpass(prompt='Re-enter Administrator password: ')