feat(docker): container that launches server and scanner in one

!1
This commit is contained in:
2024-02-21 00:26:40 +09:30
parent add0b2390b
commit f9af64e7a1
10 changed files with 474 additions and 2 deletions

View File

@ -0,0 +1,5 @@
#
# Default Scanner Scheduled Job
#
*/1 * * * * ansible-playbook nofusscomputing.phpipam_scan_agent.agent -v

View File

@ -0,0 +1,8 @@
[program:cron]
startsecs=0
stopwaitsecs=55
autostart=true
autorestart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0
command=/usr/sbin/crond -f -L /var/log/crond.log -l info

View File

@ -0,0 +1,8 @@
[program:rulebook]
startsecs=0
stopwaitsecs=55
command=ansible-rulebook -r nofusscomputing.phpipam_scan_agent.agent_receive --env-vars "HTTP_PORT" -i /root/hosts.yaml -v
autorestart=true
autostart=true
stdout_logfile=/dev/fd/1
stdout_logfile_maxbytes=0

View File

@ -0,0 +1,27 @@
[unix_http_server]
file=/var/run/supervisor.sock
chmod=0700
;[inet_http_server]
;port = :9001
; username = user
; password = 123
[supervisord]
logfile=/var/log/supervisord.log
pidfile=/var/run/supervisord.pid
nodaemon = true
user=root
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///var/run/supervisor.sock
[include]
files = /etc/supervisor/conf.d/*.conf

6
includes/root/hosts.yaml Normal file
View File

@ -0,0 +1,6 @@
all:
hosts:
localhost:
vars:
ansible_connection: local