13 Ekim 2022 Perşembe

supervisor

Kurulum
Kurmak için şöyle yaparız
apt-get install -y supervisor
Örnek
Şöyle yaparız. Burada sadece son iki bölüm bizim uygulamamız için gerekli tanımlardır
[unix_http_server]
file=/tmp/supervisor.sock   ; the path to the socket file
;chmod=0700                 ; socket file mode (default 0700)
;chown=nobody:nogroup       ; socket file uid:gid owner
username=admin              ; default is no username (open server)
password=admin              ; default is no password (open server)

[inet_http_server]         ; inet (TCP) server disabled by default
port=127.0.0.1:9001       ; ip_address:port specifier, *:port for all iface
username=admin              ; default is no username (open server)
password=admin               ; default is no password (open server)

[supervisord]
logfile=/tmp/supervisord.log ; main log file; default $CWD/supervisord.log
logfile_maxbytes=50MB        ; max main logfile bytes b4 rotation; default 50MB
logfile_backups=10           ; # of main logfile backups; 0 means none, default 10
loglevel=info                ; log level; default info; others: debug,warn,trace
pidfile=/tmp/supervisord.pid ; supervisord pidfile; default supervisord.pid
nodaemon=true               ; start in foreground if true; default false
minfds=1024                  ; min. avail startup file descriptors; default 1024
minprocs=200                 ; min. avail process descriptors;default 200
;umask=022                   ; process file creation umask; default 022
user=root            ; setuid to this UNIX account at startup; recommended if root

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

[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL  for a unix socket
serverurl=http://127.0.0.1:9001 ; use an http:// url to specify an inet socket

[program:customer-service]
command=java -jar /app/customer-service-0.0.1-SNAPSHOT.jar
startsecs=10
directory=/app
stdout_logfile=/app/customer-service.log
stdout_logfile=/app/customer-service.err


[program:lucky-winner-service]
command=java -jar /app/lucky-winner-0.0.1-SNAPSHOT.jar
startsecs=10
directory=/app
stdout_logfile=/app/lucky-winner-service.log
stdout_logfile=/app/lucky-winner-service.err


Hiç yorum yok:

Yorum Gönder