[inet_http_server]
port=127.0.0.1:9001

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

[supervisorctl]
serverurl=http://127.0.0.1:9001

[supervisord]

[program:latest_code]
directory=/home/ubuntu/ai-prompt-ctf/
command=git pull origin main
priority=1
startsecs = 0
autorestart = false
startretries = 1
user=ubuntu

[program:prepare_flags]
directory=/home/ubuntu/ai-prompt-ctf/
command=/home/ubuntu/ai-prompt-ctf/.venv/bin/python ctf/prepare_flags.py
priority=2
startsecs = 0
autorestart = false
startretries = 1
user=ubuntu

[program:ai_ctf]
priority=99
user=ubuntu
directory=/home/ubuntu/ai-prompt-ctf/
command=/home/ubuntu/ai-prompt-ctf/.venv/bin/gunicorn --timeout 300 -w 4 -k uvicorn.workers.UvicornWorker ctf.app:app --forwarded-allow-ips '*' --bind 0.0.0.0:8100 --preload
autostart=true
autorestart=true
stderr_logfile=/home/ubuntu/ai-prompt-ctf/logs/llm_ctf.err.log
stdout_logfile=/home/ubuntu/ai-prompt-ctf/logs/llm_ctf.out.log
exitstatus=0
user=ubuntu