sudo git clone https://scott_idem@bitbucket.org/oneskyit/one-sky-it-api-fastapi.git /srv/http/dev_fastapi.oneskyit.com

sudo mkdir admin/log

sudo ls -lha /srv/http/
sudo chown http:http -R /srv/http/dev_fastapi.oneskyit.com/
sudo chmod 775 -R /srv/http/dev_fastapi.oneskyit.com/
sudo ls -lha /srv/http/

cd /srv/http/dev_fastapi.oneskyit.com/
rm .gitignore

git branch -a
git switch development

virtualenv environment
source environment/bin/activate
pip install -U -r admin/requirements.txt

sudo vim /etc/systemd/system/gunicorn.socket
sudo vim /etc/systemd/system/gunicorn.service
sudo systemctl daemon-reload
sudo systemctl enable gunicorn.socket
sudo systemctl start gunicorn.socket
sudo systemctl status gunicorn.socket
sudo systemctl status gunicorn.service

# Do not: sudo systemctl enable gunicorn.service
# Do not? sudo systemctl start gunicorn.service

sudo vim /etc/nginx/sites-available/dev_fastapi.oneskyit.com
sudo ln -s /etc/nginx/sites-available/dev_fastapi.oneskyit.com /etc/nginx/sites-enabled/dev_fastapi.oneskyit.com

sudo systemctl restart nginx.service
sudo systemctl status nginx.service

# Troubleshooting:
systemctl list-units --type=service --state=active
systemctl list-units --type=service --state=running

sudo systemctl | grep running
sudo systemctl list-unit-files | grep enabled
