Add makefile + corrects log file access + Change data location

php7.4
Florestan Bredow 2020-11-09 12:37:34 +01:00
parent 9a655f9531
commit 70d87fe5d1
4 changed files with 41 additions and 6 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
/data

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]"

View File

@ -6,6 +6,9 @@ php_admin_flag[log_errors] = on
php_admin_value[memory_limit] = 32M
php_flag[display_startup_errors] = on
access.log = /var/log/php/access.log
;error.log = /var/log/error.log
catch_workers_output = yes
; for debugging 1h

View File

@ -1,8 +1,8 @@
mariadb:
image: mariadb:latest
volumes:
- ~/.mysql:/var/lib/mysql
- ~/log/mysql:/var/log/mysql
- ./data/mysql:/var/lib/mysql
- ./data/log/mysql:/var/log/mysql
expose:
- 3306
environment:
@ -21,10 +21,10 @@ php:
- 9000
volumes:
- ~/public:/var/www/html
- ~/log/xdebug:/var/log/xdebug
- ~/log/php:/var/log/php
- ./data/log/xdebug:/var/log/xdebug
- ./data/log/php:/var/log/php
- ./config/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
- ./config/showErrors.conf:/usr/local/etc/php-fpm.d/zzz-showErrors.conf
- ./config/php.conf:/usr/local/etc/php-fpm.d/zzz-settings.conf
- ./config/ssmtp.conf:/etc/ssmtp/ssmtp.conf
links:
- mariadb
@ -34,7 +34,7 @@ nginx:
image: nginx:latest
volumes:
- ~/public:/var/www/html
- ~/log/nginx:/var/log/nginx
- ./data/log/nginx:/var/log/nginx
- ./config/nginx.conf:/etc/nginx/nginx.conf
ports:
- 80:80