diff --git a/docs/environment.md b/docs/environment.md index d941d43..fad50dc 100644 --- a/docs/environment.md +++ b/docs/environment.md @@ -23,6 +23,9 @@ Changes the server root. Defaults to `/var/www/html`. If set, will enable the FastCGI pass to the PHP-FPM server. Defaults to `127.0.0.1:9000` +### PHP_FPM_IGNORE_ENV=true + +If set, with any value, will ignore the system environment variables in the PHP FPM ### NGINX_SSL_CERT and NGINX_SSL_CERT_KEY diff --git a/generator/__init__.py b/generator/__init__.py index 97f5895..23150cf 100644 --- a/generator/__init__.py +++ b/generator/__init__.py @@ -123,9 +123,10 @@ def build_cli(self, arch): def build_fpm(self, arch): self._banner("fpm") container = self._from(self.source_repo(arch, "base"), arch) - self._run_cli(["buildah", "config", "--cmd", 'php-fpm --nodaemonize', container]) + self._run_cli(["buildah", "config", "--cmd", '/start-fpm.sh', container]) self._run_cli(["buildah", "copy", container, "assets/fpm/conf/www.conf", "/etc/php{major}{minor}/php-fpm.d/www.conf".format(major=self.content["version"]["major"], minor=self.content["version"]["minor"])]) self._run_cli(["buildah", "copy", container, "assets/fpm/conf/base.conf", "/etc/php{major}{minor}/php-fpm.d/base.conf".format(major=self.content["version"]["major"], minor=self.content["version"]["minor"])]) + self._run_cli(["buildah", "copy", container, "assets/script/start-fpm.sh", "/start-fpm.sh"]) return self._build(container, "fpm", arch) @@ -137,7 +138,6 @@ def build_fpm_apache(self, arch): self._run_cli(["buildah", "copy", container, "assets/fpm-apache/conf/vhost.conf", "/etc/apache2/conf.d/"]) self._run_cli(["buildah", "copy", container, "assets/fpm-apache/conf/supervisord.conf", "/etc/supervisord.conf"]) self._run_cli(["buildah", "copy", container, "assets/script/exit-event-listener.py", "/exit-event-listener.py"]) - self._run_cli(["buildah", "copy", container, "assets/script/start-fpm.sh", "/start-fpm.sh"]) return self._build(container, "fpm-apache", arch) def build_fpm_nginx(self, arch): @@ -148,7 +148,6 @@ def build_fpm_nginx(self, arch): self._run_cli(["buildah", "copy", container, "assets/fpm-nginx/conf/nginx.vh.default.conf", "/etc/nginx/http.d/default.conf"]) self._run_cli(["buildah", "copy", container, "assets/fpm-nginx/conf/supervisord.conf", "/etc/supervisord.conf"]) self._run_cli(["buildah", "copy", container, "assets/script/exit-event-listener.py", "/exit-event-listener.py"]) - self._run_cli(["buildah", "copy", container, "assets/script/start-fpm.sh", "/start-fpm.sh"]) script = self.parse_config("php-fpm-nginx.j2", False) with open(".tmp.sh", "w") as file: file.write(script)