53 lines
1.3 KiB
Plaintext
53 lines
1.3 KiB
Plaintext
# Go to root of application
|
|
cd ~/path/to/directory/my_application/
|
|
|
|
# Create new application environment
|
|
virtualenv environment
|
|
|
|
# Activate application environment
|
|
source environment/bin/activate
|
|
|
|
# Install application requirements
|
|
pip install -r admin/requirements.txt
|
|
|
|
# Start application
|
|
uvicorn app.main:app --host 0.0.0.0 --port 5005 --reload
|
|
|
|
# View app
|
|
http://localhost:5005
|
|
|
|
# Deactivate environment when done
|
|
deactivate
|
|
|
|
|
|
# Use git
|
|
# Go to root of application
|
|
cd ~/path/to/directory/my_application/
|
|
|
|
git init
|
|
|
|
git remote add origin https://scott_idem@bitbucket.org/oneskyit/one-sky-it-api.git
|
|
git add .
|
|
git commit -m 'Initial commit'
|
|
|
|
git push -u origin master
|
|
git push -u origin development
|
|
git push -u origin new-branch-name
|
|
|
|
# List branches
|
|
git branch -a
|
|
|
|
# Create new branch
|
|
git branch new-branch-name
|
|
|
|
# Switch branch
|
|
git switch new-branch-name
|
|
|
|
|
|
# Clone from Bitbucket:
|
|
git clone https://scott_idem@bitbucket.org/oneskyit/one-sky-it-api-fastapi.git /srv/http/the_path_to_create
|
|
|
|
|
|
|
|
gunicorn --bind unix:/home/scott/OSIT_dev/aether_api_fastapi/gunicorn.sock --umask 007 app.main:app --workers 2 --worker-class uvicorn.workers.UvicornWorker --access-logfile admin/log/access.log --error-logfile admin/log/error.log, --log-file admin/log/log.log --capture-output --keep-alive 5 --reload
|