cmureadme / readme-website

0 stars 0 forks source link

document deployment steps #4

Open wade-cheng opened 3 weeks ago

wade-cheng commented 3 weeks ago

need to know how to update the repo/deployment every time a new issue or update gets out

newperson1746 commented 3 weeks ago
GITURL=
STATICFILES_CMD='cd /var/www/readme; sudo -u www-data /var/www/readme/venv/bin/python3 manage.py collectstatic'
PERMS_CMD='chmod -R 770'
STOP_CMD='systemctl stop readme-gunicorn.service'
START_CMD='systemctl start readme-gunicorn.service'

# systemctl stop readme
# git reset --hard HEAD
# git pull
# generate static files
# chmod/chown perms fix
# systemctl start readme

skeleton

newperson1746 commented 3 weeks ago

main deployment will be manual will automatically deploy staging branch dev will not be automatically deployed or be deployed at all.

staging serves as a buffer for potentially breaking changes

this is similar to debian sid(unstable) -> testing -> stable

flowchart: dev -> staging -> main

wade-cheng commented 3 weeks ago

yeppers. i'll mark this as done when we test that deploying automatically works + I update the docs correspondingly.

newperson1746 commented 2 weeks ago

deploying each branch

sudo -u www-data /var/www/readme-deploy.sh --> note that deploying main also backs up any changes in the immutable files db.sqlite3 and folder media/ to readme-backup repo sudo -u www-data /var/www/readme-staging-deploy.sh sudo -u www-data /var/www/readme-dev-deploy.sh

note that the testing branches do not keep their own media and db, they are copied from the main one on deploy and reset to main copy on deploy