mirror of
https://github.com/frappe/bench.git
synced 2025-01-10 00:37:51 +00:00
[fix] provision to regenerate supervisor and nginx config forcefully via bench serup production (#486)
This commit is contained in:
parent
7a7c61105c
commit
e79d722f8c
@ -50,10 +50,11 @@ def setup_fonts():
|
|||||||
|
|
||||||
@click.command('production')
|
@click.command('production')
|
||||||
@click.argument('user')
|
@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"
|
"setup bench for production"
|
||||||
from bench.config.production_setup import setup_production
|
from bench.config.production_setup import setup_production
|
||||||
setup_production(user=user)
|
setup_production(user=user, yes=yes)
|
||||||
|
|
||||||
|
|
||||||
@click.command('auto-update')
|
@click.command('auto-update')
|
||||||
|
@ -3,9 +3,9 @@ from bench.config.supervisor import generate_supervisor_config
|
|||||||
from bench.config.nginx import make_nginx_conf
|
from bench.config.nginx import make_nginx_conf
|
||||||
import os, subprocess
|
import os, subprocess
|
||||||
|
|
||||||
def setup_production(user, bench_path='.'):
|
def setup_production(user, bench_path='.', yes=False):
|
||||||
generate_supervisor_config(bench_path=bench_path, user=user)
|
generate_supervisor_config(bench_path=bench_path, user=user, yes=yes)
|
||||||
make_nginx_conf(bench_path=bench_path)
|
make_nginx_conf(bench_path=bench_path, yes=yes)
|
||||||
fix_prod_setup_perms(bench_path, frappe_user=user)
|
fix_prod_setup_perms(bench_path, frappe_user=user)
|
||||||
remove_default_nginx_configs()
|
remove_default_nginx_configs()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user