2
0
mirror of https://github.com/frappe/bench.git synced 2025-01-09 16:36:25 +00:00

[fix] provision to regenerate supervisor and nginx config forcefully via bench serup production (#486)

This commit is contained in:
Saurabh 2017-09-23 11:45:30 +05:30 committed by GitHub
parent 7a7c61105c
commit e79d722f8c
2 changed files with 6 additions and 5 deletions

View File

@ -50,10 +50,11 @@ def setup_fonts():
@click.command('production')
@click.argument('user')
def setup_production(user):
@click.option('--yes', help='Yes to regeneration config', is_flag=True, default=False)
def setup_production(user, yes=False):
"setup bench for production"
from bench.config.production_setup import setup_production
setup_production(user=user)
setup_production(user=user, yes=yes)
@click.command('auto-update')

View File

@ -3,9 +3,9 @@ from bench.config.supervisor import generate_supervisor_config
from bench.config.nginx import make_nginx_conf
import os, subprocess
def setup_production(user, bench_path='.'):
generate_supervisor_config(bench_path=bench_path, user=user)
make_nginx_conf(bench_path=bench_path)
def setup_production(user, bench_path='.', yes=False):
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
make_nginx_conf(bench_path=bench_path, yes=yes)
fix_prod_setup_perms(bench_path, frappe_user=user)
remove_default_nginx_configs()