-
-
Save Code-Hex/000550def0c3c3f7c00e100840c427c0 to your computer and use it in GitHub Desktop.
Revisions
-
Code-Hex revised this gist
Jun 27, 2017 . 1 changed file with 14 additions and 17 deletions.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 @@ -1,35 +1,32 @@ .DEFAULT_GOAL := help config: ## copy configs from repository to conf @sudo cp ~/$HOME/webapp/conf/nginx/nginx.conf /etc/nginx/ @sudo cp ~/$HOME/webapp/conf/nginx/isucon.conf /etc/nginx/conf.d/ @sudo cp ~/$HOME/webapp/conf/mysql/my.cnf /etc/mysql/ @make -s nginx-restart @make -s mysql-restart @make -s go-restart go-start: ## Run Server @sudo systemctl start isu-go go-stop: ## Stop Server @sudo systemctl stop isu-go go-log: ## log Server @sudo journalctl -u isu-go go-restart: ## Restart Server @sudo systemctl restart isu-go @echo 'Restart isu-go' nginx-restart: ## Restart nginx @sudo systemctl restart nginx @echo 'Restart nginx' nginx-reset-log: ## reest log and restart nginx @sudo rm /var/log/nginx/access.log;sudo systemctl restart nginx nginx-log: ## tail nginx access.log @sudo tail -f /var/log/nginx/access.log -
saboyutaka revised this gist
Jun 26, 2017 . 1 changed file with 17 additions and 23 deletions.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 @@ -1,35 +1,31 @@ .DEFAULT_GOAL := help config: ## copy configs from repository to conf @sudo cp ~/private_isu/webapp/conf/systemd/isu-ruby.service /etc/systemd/system/ @sudo cp ~/private_isu/webapp/conf/nginx/nginx.conf /etc/nginx/ @sudo cp ~/private_isu/webapp/conf/nginx/isucon.conf /etc/nginx/conf.d/ @sudo cp ~/private_isu/webapp/conf/mysql/my.cnf /etc/mysql/ @make -s nginx-restart @make -s mysql-restart @make -s ruby-restart ruby-start: ## Run Server @sudo systemctl start isu-ruby ruby-stop: ## Stop Server @sudo systemctl stop isu-ruby ruby-log: ## log Server @sudo journalctl -u isu-ruby ruby-restart: ## Restart Server @sudo systemctl daemon-reload @cd webapp/ruby; bundle 1> /dev/null @sudo systemctl restart isu-ruby @echo 'Restart isu-ruby' nginx-restart: ## Restart nginx @sudo systemctl restart nginx @echo 'Restart nginx' nginx-reset-log: ## reest log and restart nginx @@ -41,15 +37,13 @@ nginx-log: ## tail nginx access.log nginx-error-log: ## tail nginx error.log @sudo tail -f /var/log/nginx/error.log mysql-restart: ## Restart mysql @sudo systemctl restart mysql @echo 'Restart mysql' myprofiler: ## Run myprofiler @myprofiler -user=root .PHONY: help help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' -
saboyutaka created this gist
Jun 23, 2017 .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,55 @@ .DEFAULT_GOAL := help start: ## Run Server @sudo systemctl start isu-ruby stop: ## Stop Server @sudo systemctl stop isu-ruby log: ## log Server @sudo journalctl -u isu-ruby config: ## copy configs from repository to conf @sudo cp ~/private_isu/webapp/conf/systemd/isu-ruby.service /etc/systemd/system/ @sudo cp ~/private_isu/webapp/conf/nginx/nginx.conf /etc/nginx/ @sudo cp ~/private_isu/webapp/conf/nginx/isucon.conf /etc/nginx/conf.d/ @sudo cp ~/private_isu/webapp/conf/mysql/my.cnf /etc/mysql/ @make -s restart @make -s nginx-restart @make -s db-restart restart: ## Restart Server @sudo systemctl daemon-reload @cd webapp/ruby; bundle 1> /dev/null @sudo systemctl restart isu-ruby @echo 'Restart isu-ruby' db-restart: ## Restart mysql @sudo service mysql restart @echo 'Restart mysql' nginx-restart: ## Restart nginx @sudo service nginx restart @echo 'Restart nginx' nginx-reset-log: ## reest log and restart nginx @sudo rm /var/log/nginx/access.log;sudo service nginx restart nginx-log: ## tail nginx access.log @sudo tail -f /var/log/nginx/access.log nginx-error-log: ## tail nginx error.log @sudo tail -f /var/log/nginx/error.log myprofiler: ## Run myprofiler @myprofiler -user=root db-slow-query: ## tail slow query log @sudo tail -f /var/log/mysql/mysql-slow.log alp: ## nginx analyzer @sudo /home/isucon/gocode/bin/alp -f /var/log/nginx/access.log ${ARGS} .PHONY: help help: @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'