Add makefile + corrects log file access + Change data location
This commit is contained in:
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/data
|
31
Makefile
Normal file
31
Makefile
Normal 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]"
|
@@ -6,6 +6,9 @@ php_admin_flag[log_errors] = on
|
|||||||
php_admin_value[memory_limit] = 32M
|
php_admin_value[memory_limit] = 32M
|
||||||
php_flag[display_startup_errors] = on
|
php_flag[display_startup_errors] = on
|
||||||
|
|
||||||
|
access.log = /var/log/php/access.log
|
||||||
|
;error.log = /var/log/error.log
|
||||||
|
|
||||||
catch_workers_output = yes
|
catch_workers_output = yes
|
||||||
|
|
||||||
; for debugging 1h
|
; for debugging 1h
|
@@ -1,8 +1,8 @@
|
|||||||
mariadb:
|
mariadb:
|
||||||
image: mariadb:latest
|
image: mariadb:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ~/.mysql:/var/lib/mysql
|
- ./data/mysql:/var/lib/mysql
|
||||||
- ~/log/mysql:/var/log/mysql
|
- ./data/log/mysql:/var/log/mysql
|
||||||
expose:
|
expose:
|
||||||
- 3306
|
- 3306
|
||||||
environment:
|
environment:
|
||||||
@@ -21,10 +21,10 @@ php:
|
|||||||
- 9000
|
- 9000
|
||||||
volumes:
|
volumes:
|
||||||
- ~/public:/var/www/html
|
- ~/public:/var/www/html
|
||||||
- ~/log/xdebug:/var/log/xdebug
|
- ./data/log/xdebug:/var/log/xdebug
|
||||||
- ~/log/php:/var/log/php
|
- ./data/log/php:/var/log/php
|
||||||
- ./config/xdebug.ini:/usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini
|
- ./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
|
- ./config/ssmtp.conf:/etc/ssmtp/ssmtp.conf
|
||||||
links:
|
links:
|
||||||
- mariadb
|
- mariadb
|
||||||
@@ -34,7 +34,7 @@ nginx:
|
|||||||
image: nginx:latest
|
image: nginx:latest
|
||||||
volumes:
|
volumes:
|
||||||
- ~/public:/var/www/html
|
- ~/public:/var/www/html
|
||||||
- ~/log/nginx:/var/log/nginx
|
- ./data/log/nginx:/var/log/nginx
|
||||||
- ./config/nginx.conf:/etc/nginx/nginx.conf
|
- ./config/nginx.conf:/etc/nginx/nginx.conf
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
|
Reference in New Issue
Block a user