Several corrections

This commit is contained in:
Marwolf
2018-07-06 13:45:13 -04:00
parent 9b2fa50740
commit 1b11313c81

View File

@@ -10,14 +10,17 @@ help:
@echo "usage: make COMMAND" @echo "usage: make COMMAND"
@echo "" @echo ""
@echo "Commands:" @echo "Commands:"
@echo " pull Get the latest GitHub repos" @echo " clone Clone the GitHub repos"
@echo " start Create and start containers" @echo " pull Get the latest GitHub repo updates"
@echo " stop Stop all services" @echo " start Create and start containers"
@echo " restart Restart containers" @echo " stop Stop all services"
@echo " logs Follow log output" @echo " restart Restart containers"
@echo " import Import all databases from the GitHub repos" @echo " logs Follow log output"
@echo " dump Create backup of all local databases" @echo " import Import all databases from the GitHub repos"
@echo " restore Restore backup of all local databases" @echo " dump Create backup of all local databases"
@echo " restore Restore backup of all local databases"
@echo " flush Delete local GitHub repos"
@echo ""
start: init start: init
docker-compose up -d docker-compose up -d
@@ -25,22 +28,18 @@ start: init
stop: stop:
@docker-compose down -v @docker-compose down -v
restart: restart: init
@docker-compose down -v @docker-compose down -v
docker-compose up -d docker-compose up -d
pull: clone:
@$(shell git clone https://github.com/Marwolf/Open-RSC-Website.git) @$(shell git clone https://github.com/Marwolf/Open-RSC-Website.git && git clone https://github.com/Marwolf/Open-RSC)
cd Open-RSC-Website
git pull
cd ..
@$(shell git clone https://github.com/Marwolf/Open-RSC) @$(shell git clone https://github.com/Marwolf/Open-RSC)
cd Open-RSC @$(shell sudo chmod -R 777 Open-RSC-Website/board/cache/ && sudo chmod 644 Open-RSC-Website/board/config.php)
git pull
cd ..
gen-certs: pull:
@docker run --rm -v $(shell pwd)/etc/ssl:/certificates -e "SERVER=$(NGINX_HOST)" jacoelho/generate-certificate @$(shell cd Open-RSC-Website && git pull && cd .. && cd Open-RSC && git pull && cd ..)
@$(shell sudo chmod -R 777 Open-RSC-Website/board/cache/ && sudo chmod 644 Open-RSC-Website/board/config.php)
logs: logs:
@docker-compose logs -f @docker-compose logs -f
@@ -59,7 +58,10 @@ import:
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Open-RSC/Databases/openrsc.sql 2>/dev/null @docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Open-RSC/Databases/openrsc.sql 2>/dev/null
@docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Open-RSC-Website/openrsc_forum.sql 2>/dev/null @docker exec -i $(shell docker-compose ps -q mysqldb) mysql -u"$(MYSQL_ROOT_USER)" -p"$(MYSQL_ROOT_PASSWORD)" < Open-RSC-Website/openrsc_forum.sql 2>/dev/null
flush:
@$(shell rm -rf Open-RSC-Website && rm -rf Open-RSC)
resetOwner: resetOwner:
@$(shell chown -Rf $(SUDO_USER):$(shell id -g -n $(SUDO_USER)) $(MYSQL_DUMPS_DIR) "$(shell pwd)/etc/ssl" 2> /dev/null) @$(shell chown -Rf $(SUDO_USER):$(shell id -g -n $(SUDO_USER)) $(MYSQL_DUMPS_DIR) "$(shell pwd)/etc/ssl" 2> /dev/null)
.PHONY: clean test code-sniff init .PHONY: clean test code-sniff init