Add makefile + corrects log file access + Change data location

This commit is contained in:
2020-11-09 12:37:34 +01:00
parent 9a655f9531
commit 70d87fe5d1
4 changed files with 41 additions and 6 deletions

31
Makefile Normal file
View File

@@ -0,0 +1,31 @@
SHELL := bash
ifeq ($(origin .RECIPEPREFIX), undefined)
$(error This Make does not support .RECIPEPREFIX. Please use GNU Make 4.0 or later)
endif
.RECIPEPREFIX = >
.DEFAULT_GOAL := help
.PHONY: init create-dir set-acl update run help
DC=docker-compose
XDEBUGFILE="data/log/xdebug/xdebug.log"
init: create-dir set-acl update
create-dir:
> mkdir -p data/log/{mysql,nginx,php,xdebug}
> touch $(XDEBUGFILE)
set-acl:
> sudo setfacl -R -m u:${USER}:rwX,d:u:${USER}:rwX data
> sudo chown 82:82 $(XDEBUGFILE)
update:
> $(DC) pull
> $(DC) build --pull
run:
> $(DC) up
help:
> @printf "Usage : make [init|update|set-acl|run]"