Can I do something like this? So that suppervisor can use different branch?
[program:a]
command=/home/ubuntu/a-venv/bin/uvicorn a.path.main:app --host=0.0.0.0 --port 9009 --loop uvloop --log-level info
# this will run on master branch
directory=/home/ubuntu/a
user=ubuntu
autostart=true
autorestart=true
[program:b]
command=/home/ubuntu/a-venv/bin/uvicorn a.path.main:app --host=0.0.0.0 --port 9009 --loop uvloop --log-level info
# this will run to differnt branch say branch_1
directory=/home/ubuntu/a
user=ubuntu
autostart=true
autorestart=true
Supervisor will execute files in the file system. It does not know nor care about git. You either have the version of branch A or branch B checked out in the file system. Supervisor cannot execute any files which aren't checked out, and you cannot check out two versions of the same file in the same location at the same time.
However, you can check out two different version in two different locations. So make another folder with another checked out branch and run that from supervisor.