Skip to content

Since Dec 19, 2021 - Open source code of CambodiaEdu.org's website - Project Practicum with Dr. Srun Sovila at RUPP 2021 (ITE-G6-Y2).

Notifications You must be signed in to change notification settings

thisisdensok/cambodiaedu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Welcome to the official open source code of cambodiaedu.org!

  • How to clone the project specific branches.
$ git clone --branch <branchname> <remote-repo-url>

or

$ git clone -b <branchname> <remote-repo-url>
  • Local push code to GitHub.
git status
git add . && git commit -am "Update" && git push
  • Access the GitHub to clone/pull origin.
ssh root@165.22.53.242

eval "$(ssh-agent -s)" && ssh-add ~/.ssh/github_id_ed25519 && cd cambodiaedu && git pull && source .venv/bin/activate && cd app && python3 manage.py collectstatic

eval "$(ssh-agent -s)" && ssh-add ~/.ssh/github_id_ed25519 && cd cambodiaedu && git pull && source .venv/bin/activate && cd app && python3 manage.py makemigrations && python3 manage.py migrate && python3 manage.py collectstatic

deactivate && cd ~ && sudo systemctl restart gunicorn && sudo nginx -t && sudo systemctl restart nginx

python3 manage.py test

sudo tail -F /var/log/nginx/error.log
  • Production deployed in Ubuntu should:
cp /var/www/cambodiaedu/.env.sample /var/www/cambodiaedu/.env

  • Create or refresh new database:
$ python manage.py makemigrations
$ python manage.py migrate
  • Remove or add git origin:
$ git remote -v
$ git remote remove origin
$ git remote add origin https://github.com/thisisdensok/cambodiaedu.git

- Clone from server
$ git clone git@github.com:thisisdensok/cambodiaedu.git

- Clone from local machine
$ https://github.com/thisisdensok/cambodiaedu.git
  • To push the current branch and set the remote as upstream, use:
$ git push --set-upstream origin main
  • Commit backdate in GitHub.
$ git commit --amend
$ git add . && git commit --date="YYYY-MM-DD HH:MM:SS" -am "Update" && git push --force-with-lease

About

Since Dec 19, 2021 - Open source code of CambodiaEdu.org's website - Project Practicum with Dr. Srun Sovila at RUPP 2021 (ITE-G6-Y2).

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages