Skip to content

Instantly share code, notes, and snippets.

@jcppkkk
Last active June 14, 2018 07:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcppkkk/24fd86398485819c86df1a9061815b65 to your computer and use it in GitHub Desktop.
Save jcppkkk/24fd86398485819c86df1a9061815b65 to your computer and use it in GitHub Desktop.
cuckoo supervisord.conf (cuckoo-service, process, rooter, web, api)
upstream _uwsgi_cuckoo_api {
server unix:/home/ubuntu/.cuckoo/cuckoo-api.socket;
}
server {
listen 8090;
# REST API app
location / {
client_max_body_size 1G;
uwsgi_pass _uwsgi_cuckoo_api;
include uwsgi_params;
}
}
[uwsgi]
plugins = python
virtualenv = /home/ubuntu/cuckoo/venv
module = cuckoo.apps.api
callable = app
uid = ubuntu
gid = ubuntu
env = CUCKOO_APP=api
env = CUCKOO_CWD=/home/ubuntu/.cuckoo
socket = /home/ubuntu/.cuckoo/cuckoo-api.socket
chmod-socket = 664
processes = 5
vacuum = true
upstream _uwsgi_cuckoo_web {
server unix:/home/ubuntu/.cuckoo/cuckoo-web.socket;
}
server {
listen 80;
# Cuckoo Web Interface
location / {
client_max_body_size 1G;
proxy_redirect off;
proxy_set_header X-Forwarded-Proto $scheme;
uwsgi_pass _uwsgi_cuckoo_web;
include uwsgi_params;
}
}
[uwsgi]
plugins = python
virtualenv = /home/ubuntu/cuckoo/venv
module = cuckoo.web.web.wsgi
uid = ubuntu
gid = ubuntu
static-map = /static=/home/ubuntu/cuckoo/cuckoo/web/static
# If you're getting errors about the PYTHON_EGG_CACHE, then
# uncomment the following line and add some path that is
# writable from the defined user.
# env = PYTHON_EGG_CACHE=
env = CUCKOO_APP=web
env = CUCKOO_CWD=/home/ubuntu/.cuckoo
socket = /home/ubuntu/.cuckoo/cuckoo-web.socket
chmod-socket = 664
processes = 1
vacuum = true
[supervisord]
logfile = /home/ubuntu/.cuckoo/log/supervisord.log
pidfile = /home/ubuntu/.cuckoo/supervisord/pidfile
user = root
[supervisorctl]
serverurl = unix:///home/ubuntu/.cuckoo/supervisord/unix.sock
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[unix_http_server]
file = /home/ubuntu/.cuckoo/supervisord/unix.sock
[program:cuckoo]
command = /home/ubuntu/cuckoo/venv/bin/cuckoo --nolog -d -m 10000
user = ubuntu
startsecs = 30
autostart = true
autorestart = true
stdout_logfile = syslog
stderr_logfile = syslog
[program:worker]
command = /home/ubuntu/cuckoo/venv/bin/cuckoo --nolog process w%(process_num)d
process_name = w%(process_num)d
numprocs = 4
user = ubuntu
autostart = true
autorestart = true
stdout_logfile = syslog
stderr_logfile = syslog
[program:rooter]
command = /home/ubuntu/cuckoo/venv/bin/cuckoo --nolog rooter -g ubuntu
user = root
autostart = true
autorestart = true
stdout_logfile = syslog
stderr_logfile = syslog
[program:web]
command = uwsgi /home/ubuntu/.cuckoo/cuckoo-web.ini
user = ubuntu
autostart = true
autorestart = true
startretries = 3
stdout_logfile = syslog
stderr_logfile = syslog
[program:api]
command = uwsgi /home/ubuntu/.cuckoo/cuckoo-api.ini
user = ubuntu
autostart = true
autorestart = true
startretries = 3
stdout_logfile = syslog
stderr_logfile = syslog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment