Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2017
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.96 KB | None | 0 0
  1. ; Sample supervisor config file.
  2. ;
  3. ; For more information on the config file, please see:
  4. ; http://supervisord.org/configuration.html
  5. ;
  6. ; Notes:
  7. ; - Shell expansion ("~" or "$HOME") is not supported. Environment
  8. ; variables can be expanded using this syntax: "%(ENV_HOME)s".
  9. ; - Comments must have a leading space: "a=b ;comment" not "a=b;comment".
  10.  
  11. [unix_http_server]
  12. file=/var/log/supervisor/supervisor.sock ; (the path to the socket file)
  13. ;chmod=0700 ; socket file mode (default 0700)
  14. ;chown=nobody:nogroup ; socket file uid:gid owner
  15. ;username=user ; (default is no username (open server))
  16. ;password=123 ; (default is no password (open server))
  17.  
  18. ;[inet_http_server] ; inet (TCP) server disabled by default
  19. ;port=127.0.0.1:9001 ; (ip_address:port specifier, *:port for all iface)
  20. ;username=user ; (default is no username (open server))
  21. ;password=123 ; (default is no password (open server))
  22.  
  23. [supervisord]
  24. logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
  25. logfile_maxbytes=50MB ; (max main logfile bytes b4 rotation;default 50MB)
  26. logfile_backups=10 ; (num of main logfile rotation backups;default 10)
  27. loglevel=info ; (log level;default info; others: debug,warn,trace)
  28. pidfile=/var/log/supervisor/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
  29. nodaemon=false ; (start in foreground if true;default false)
  30. minfds=1024 ; (min. avail startup file descriptors;default 1024)
  31. minprocs=200 ; (min. avail process descriptors;default 200)
  32. ;umask=022 ; (process file creation umask;default 022)
  33. ;user=chrism ; (default is current user, required if root)
  34. ;identifier=supervisor ; (supervisord identifier, default is 'supervisor')
  35. ;directory=/tmp ; (default is not to cd during start)
  36. ;nocleanup=true ; (don't clean up tempfiles at start;default false)
  37. ;childlogdir=/tmp ; ('AUTO' child log dir, default $TEMP)
  38. ;environment=KEY="value" ; (key value pairs to add to environment)
  39. ;strip_ansi=false ; (strip ansi escape codes in logs; def. false)
  40.  
  41. ; the below section must remain in the config file for RPC
  42. ; (supervisorctl/web interface) to work, additional interfaces may be
  43. ; added by defining them in separate rpcinterface: sections
  44. [rpcinterface:supervisor]
  45. supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
  46.  
  47. [supervisorctl]
  48. serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
  49. ;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket
  50. ;username=chris ; should be same as http_username if set
  51. ;password=123 ; should be same as http_password if set
  52. ;prompt=mysupervisor ; cmd line prompt (default "supervisor")
  53. ;history_file=~/.sc_history ; use readline history if available
  54.  
  55. ; The below sample program section shows all possible program subsection values,
  56. ; create one or more 'real' program: sections to be able to control them under
  57. ; supervisor.
  58.  
  59. ;[program:theprogramname]
  60. ;command=/bin/cat ; the program (relative uses PATH, can take args)
  61. ;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
  62. ;numprocs=1 ; number of processes copies to start (def 1)
  63. ;directory=/tmp ; directory to cwd to before exec (def no cwd)
  64. ;umask=022 ; umask for process (default None)
  65. ;priority=999 ; the relative start priority (default 999)
  66. ;autostart=true ; start at supervisord start (default: true)
  67. ;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
  68. ;startretries=3 ; max # of serial start failures when starting (default 3)
  69. ;autorestart=unexpected ; when to restart if exited after running (def: unexpected)
  70. ;exitcodes=0,2 ; 'expected' exit codes used with autorestart (default 0,2)
  71. ;stopsignal=QUIT ; signal used to kill process (default TERM)
  72. ;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
  73. ;stopasgroup=false ; send stop signal to the UNIX process group (default false)
  74. ;killasgroup=false ; SIGKILL the UNIX process group (def false)
  75. ;user=chrism ; setuid to this UNIX account to run the program
  76. ;redirect_stderr=true ; redirect proc stderr to stdout (default false)
  77. ;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
  78. ;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
  79. ;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
  80. ;stdout_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
  81. ;stdout_events_enabled=false ; emit events on stdout writes (default false)
  82. ;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
  83. ;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
  84. ;stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
  85. ;stderr_capture_maxbytes=1MB ; number of bytes in 'capturemode' (default 0)
  86. ;stderr_events_enabled=false ; emit events on stderr writes (default false)
  87. ;environment=A="1",B="2" ; process environment additions (def no adds)
  88. ;serverurl=AUTO ; override serverurl computation (childutils)
  89.  
  90. ; The below sample eventlistener section shows all possible
  91. ; eventlistener subsection values, create one or more 'real'
  92. ; eventlistener: sections to be able to handle event notifications
  93. ; sent by supervisor.
  94.  
  95. ;[eventlistener:theeventlistenername]
  96. ;command=/bin/eventlistener ; the program (relative uses PATH, can take args)
  97. ;process_name=%(program_name)s ; process_name expr (default %(program_name)s)
  98. ;numprocs=1 ; number of processes copies to start (def 1)
  99. ;events=EVENT ; event notif. types to subscribe to (req'd)
  100. ;buffer_size=10 ; event buffer queue size (default 10)
  101. ;directory=/tmp ; directory to cwd to before exec (def no cwd)
  102. ;umask=022 ; umask for process (default None)
  103. ;priority=-1 ; the relative start priority (default -1)
  104. ;autostart=true ; start at supervisord start (default: true)
  105. ;startsecs=1 ; # of secs prog must stay up to be running (def. 1)
  106. ;startretries=3 ; max # of serial start failures when starting (default 3)
  107. ;autorestart=unexpected ; autorestart if exited after running (def: unexpected)
  108. ;exitcodes=0,2 ; 'expected' exit codes used with autorestart (default 0,2)
  109. ;stopsignal=QUIT ; signal used to kill process (default TERM)
  110. ;stopwaitsecs=10 ; max num secs to wait b4 SIGKILL (default 10)
  111. ;stopasgroup=false ; send stop signal to the UNIX process group (default false)
  112. ;killasgroup=false ; SIGKILL the UNIX process group (def false)
  113. ;user=chrism ; setuid to this UNIX account to run the program
  114. ;redirect_stderr=false ; redirect_stderr=true is not allowed for eventlisteners
  115. ;stdout_logfile=/a/path ; stdout log path, NONE for none; default AUTO
  116. ;stdout_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
  117. ;stdout_logfile_backups=10 ; # of stdout logfile backups (default 10)
  118. ;stdout_events_enabled=false ; emit events on stdout writes (default false)
  119. ;stderr_logfile=/a/path ; stderr log path, NONE for none; default AUTO
  120. ;stderr_logfile_maxbytes=1MB ; max # logfile bytes b4 rotation (default 50MB)
  121. ;stderr_logfile_backups=10 ; # of stderr logfile backups (default 10)
  122. ;stderr_events_enabled=false ; emit events on stderr writes (default false)
  123. ;environment=A="1",B="2" ; process environment additions
  124. ;serverurl=AUTO ; override serverurl computation (childutils)
  125.  
  126. ; The below sample group section shows all possible group values,
  127. ; create one or more 'real' group: sections to create "heterogeneous"
  128. ; process groups.
  129.  
  130. ;[group:thegroupname]
  131. ;programs=progname1,progname2 ; each refers to 'x' in [program:x] definitions
  132. ;priority=999 ; the relative start priority (default 999)
  133.  
  134. ; The [include] section can just contain the "files" setting. This
  135. ; setting can list multiple files (separated by whitespace or
  136. ; newlines). It can also contain wildcards. The filenames are
  137. ; interpreted as relative to this file. Included files *cannot*
  138. ; include files themselves.
  139.  
  140. ;[include]
  141. ;files = relative/directory/*.ini
  142.  
  143. [program:stage-node]
  144. directory=/var/www/html/example/library/NodeJS/
  145. command=/usr/bin/node /var/www/html/example/library/NodeJS/app.js
  146. redirect_stderr=true
  147. autostart=false
  148. autorestart=false
  149. stderr_logfile = /var/log/supervisor/stage-node-stderr.log
  150. stdout_logfile = /var/log/supervisor/stage-node-stdout.log
  151.  
  152. [ec2-user@ip-ADDRESS ~]$ supervisorctl
  153. stage-node FATAL unknown error making dispatchers for 'stage-node': EACCES
  154. supervisor>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement