Add makefile + corrects log file access + Change data location
parent
9a655f9531
commit
70d87fe5d1
@ -0,0 +1 @@
|
||||
/data
|
@ -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]"
|
Loading…
Reference in New Issue