Skip to content

Commit

Permalink
django-py3: fix can't connect db.
Browse files Browse the repository at this point in the history
  • Loading branch information
methane committed Nov 22, 2013
1 parent 81a7854 commit d839b14
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion django/setup_py3.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ def start(args, logfile, errfile):
global proc
setup_util.replace_text("django/hello/hello/settings.py", "HOST': '.*'", "HOST': '" + args.database_host + "'")
setup_util.replace_text("django/hello/hello/settings.py", "\/home\/ubuntu", home)
env = os.environ.copy()
env['DJANGO_DB'] = 'mysql'
proc = subprocess.Popen([
bin_dir + "/gunicorn",
"hello.wsgi:application",
"-k", "meinheld.gmeinheld.MeinheldWorker",
"-b", "0.0.0.0:8080",
'-w', str(NCPU*3),
"--log-level=critical"],
cwd="django/hello", stderr=errfile, stdout=logfile)
cwd="django/hello",
env=env, stderr=errfile, stdout=logfile)
return 0

def stop(logfile, errfile):
Expand Down

0 comments on commit d839b14

Please sign in to comment.