I was making an app with Django and using fabric and cuisine to code the environment construction, but gunicorn doesn't daemonize well. If you remove the daemonization option, it will be executed, so I don't think it's because the settings are incorrect.
puts(green('Starting gunicorn process...'))
with cd(project_root_path):
run('gunicorn {}.wsgi:application -c gunicorn_conf.py'.format(project_name))
Just set pty = False
. I haven't read the reason because it's troublesome.
run('gunicorn {}.wsgi:application -c gunicorn_conf.py'.format(project_name), pty=False)
http://www.fabfile.org/faq.html#init-scripts-don-t-work You can see it by reading ʻInit scripts do n’t work!` Here. I haven't read it in detail, but it seems that something doesn't work.
In my case, starting and stopping nginx and td-agent worked, but gunicorn, which is not managed as a package, did not work.
For the time being, this completes the server environment construction and deployment with a single command.
Recommended Posts