diff --git a/docker-compose.yml b/docker-compose.yml index 6006e7b..ca2c3d4 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,6 @@ web: - image: richarvey/nginx-php-fpm + build: docker + dockerfile: DockerfileNginx links: - db ports: diff --git a/docker/DockerfileNginx b/docker/DockerfileNginx new file mode 100644 index 0000000..926512e --- /dev/null +++ b/docker/DockerfileNginx @@ -0,0 +1,6 @@ +FROM richarvey/nginx-php-fpm + +ADD run-web.sh / +RUN chmod 755 /run-web.sh + +CMD ["/run-web.sh"] diff --git a/docker/run-mariadb.sh b/docker/run-mariadb.sh old mode 100644 new mode 100755 diff --git a/docker/run-web.sh b/docker/run-web.sh new file mode 100755 index 0000000..d6c2d4d --- /dev/null +++ b/docker/run-web.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +sed -ri ' +/^php_flag\[display_errors\]/ d +$ a php_flag[display_errors] = on +' /usr/local/etc/php-fpm.conf + +sed -ri ' +/^;?error_log/ c error_log = syslog +/^;?syslog.facility/ c syslog.facility = daemon +/^;?syslog.ident/ c syslog.ident = php-fpm +/^;?log_level/ c log_level = notice +' /usr/local/etc/php-fpm.d/*.conf + +tee /usr/local/etc/php/conf.d/zzz-registration-system.ini << END +[PHP] +error_reporting = E_ALL & ~E_NOTICE +display_errors = On +display_startup_errors = On +log_errors = On +ignore_repeated_errors = Off +ignore_repeated_source = Off +track_errors = On +html_errors = On +END + +exec /start.sh