Created
August 30, 2019 08:43
-
-
Save ngocquyhoang/4665af1d34b92fff5f736d71ff740fc8 to your computer and use it in GitHub Desktop.
Revisions
-
ngocquyhoang revised this gist
Aug 30, 2019 . No changes.There are no files selected for viewing
-
ngocquyhoang created this gist
Aug 30, 2019 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ ## Deploy dự án Ethos Ethos trên production không sử dụng git để quản lý code mà dùng RSync để push code Để deploy code lên Ethos cần thực hiện: - composer install trên local - sync lên server production sau khi đảm bảo code trên local là mới nhất thì có thể chạy lênh dưới đây. Chú ý `~/.ssh/axalize/ethos_production` là đường dẫn đến file key của server ``` rsync --progress -avzh --exclude='.git/' --exclude='deploy.sh' --exclude='.env' --exclude='.editorconfig' --exclude='.git*' --exclude='Dockerfile' --exclude='README.md' -e "ssh -i ~/.ssh/axalize/ethos_production" --rsync-path="sudo rsync" . [email protected]:/var/www/ethos ssh -i ~/.ssh/axalize/ethos_production -t [email protected] "sudo chown -R www-data:www-data /var/www/ethos" ssh -i ~/.ssh/axalize/ethos_production -t [email protected] "sudo chmod -R 755 /var/www/ethos" ssh -i ~/.ssh/axalize/ethos_production -t [email protected] "sudo chmod -R 777 /var/www/ethos/storage" ssh -i ~/.ssh/axalize/ethos_production -t [email protected] "sudo chmod -R 777 /var/www/ethos/public" ``` This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,18 @@ ## Deploy dự án Oroshidama Oroshidama trên production được dùng GIT. Để deploy cần pull code về, sử dụng kèm sudo nếu báo permision denice ``` sudo git pull origin master ``` các lệnh `config:clear`, `config:cache`, `view:clear`, `view:cache`, `route:clear`, `route:cache` sử dụng tùy trường hợp, nếu deploy thông thường thì không cân sử dụng sau khi pull code và check code mới nhất đã có trên servercần đổi lại quyền và owner cho project ``` sudo chown -R apache:apache httpd/ sudo chmod 775 -R httpd/ sudo chmod 777 -R httpd/public/ sudo chmod 777 -R httpd/storage/ ```