LoginSignup
0
6

More than 5 years have passed since last update.

supervisord.confのサンプル

Posted at

ubuntu1604でSupervisorを初めて入れてみた。

CLIで管理するか、ブラウザで管理するか選べる。(Apatchとかは不要。)

以下サンプルコンフィグ。
(デフォルトでいらないコメントはほぼ削除してます。)

root@ubuntu1604:/etc/supervisor# cat supervisord.conf
; supervisor config file

[unix_http_server]  ;コマンドラインから実行する場合
file=/var/run/supervisor.sock   ; (the path to the socket file)
chmod=0700                       ; sockef file mode (default 0700)
chown=root:root

;[inet_http_server]  ;ブラウザを使用する場合(unix_http_serverを使用する場合は止める。)
;port=127.0.0.1:9001
;username = admin
;password = admin


[supervisord]
logfile=/var/log/supervisor/supervisord.log ; (main log file;default $CWD/supervisord.log)
pidfile=/var/run/supervisord.pid ; (supervisord pidfile;default supervisord.pid)
childlogdir=/var/log/supervisor            ; ('AUTO' child log dir, default $TEMP)
; 2017-05-18
; It resolves the «CRIT Supervisor running as root (no user in config file)» warning in the log.
user = root


[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface

[supervisorctl]
serverurl=unix:///var/run/supervisor.sock ; use a unix:// URL  for a unix socket(unix_http_server)
;serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket(inet_httpserver)
;username=chris              ; should be same as in [*_http_server] if set
;password=123                ; should be same as in [*_http_server] if set
prompt=mysupervisor         ; cmd line prompt (default "supervisor")
history_file=~/.sc_history  ; use readline history if available


[include]
files = /etc/supervisor/conf.d/*.conf

プロセス再起動
systemctl stop supervisor
systemctl start supervisor

/var/log/syslog/var/log/supervisor/supervisord.logに怪しいメッセージが出てなければOK。

2017-11-14 14:53:25,013 CRIT Set uid to user 0
2017-11-14 14:53:25,026 CRIT Server 'unix_http_server' running without any HTTP authentication checking


こういうログが出てるけど無視でよさそう(暇があれば解決策を調べます。)

0
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
6