Edvard Kristiansen
02/24/2022, 10:50 AM[unix_http_server]
file=/tmp/supervisor.sock
[supervisord]
loglevel=debug
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock
[program:local-agent]
command=prefect agent local start -l local
[program:docker-agent]
command=prefect agent docker start -l docker
The main issue I am trying to solve is keeping the agent up and running at all times. My VM does a scheduled restart once a day which means any agents I spin up manually will be shut down. Is there any way of setting the agent itself up as a docker container which starts on startup like the prefect server itself? It seems like the docker agent itself isnt actually running in docker but rather just issues the flow to its own docker container?Anna Geller
02/24/2022, 10:54 AM[unix_http_server]
file=/tmp/supervisor.sock ; the path to the socket file
[supervisord]
loglevel=debug ; log level; default info; others: debug,warn,trace
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[supervisorctl]
serverurl=unix:///tmp/supervisor.sock ; use a unix:// URL for a unix socket
[program:prefect-agent]
command=/Users/anna/opt/anaconda3/envs/YOUR_ENV_NAME/bin/prefect agent docker start -l docker
Edvard Kristiansen
02/24/2022, 11:01 AMcommand=/bin/bash -c 'source ~/python-environments/prefect/bin/activate && prefect agent docker start -l docker'
I am still however having issues with getting supervisor to restart on boot of the VM though. I get this: "_unix:///tmp/supervisor.sock"_ no such file error after a restart. Could it be because the socket file is saved in the tmp folder?Anna Geller
02/28/2022, 10:52 AMsupervisord -c ./supervisord.conf
This way you don't need any privileged permissions to access such directory upon reboot