From 7266ec5443bfb12b02117a8055f4efc33acbc42d Mon Sep 17 00:00:00 2001 From: jurgenhaas <juergen.haas@lakedrops.com> Date: Sat, 10 Feb 2024 11:51:48 +0100 Subject: [PATCH] composer/plugin/docker4drupal#68 Add support for invoice ninja --- src/Handler.php | 9 +++++++++ templates/in/hosts.twig | 1 + templates/in/in-vhost.conf.twig | 27 +++++++++++++++++++++++++++ 3 files changed, 37 insertions(+) create mode 100644 templates/in/hosts.twig create mode 100644 templates/in/in-vhost.conf.twig diff --git a/src/Handler.php b/src/Handler.php index 89fd8b0..f8c18ca 100644 --- a/src/Handler.php +++ b/src/Handler.php @@ -248,6 +248,7 @@ class Handler extends BaseHandler { '$SSH_AUTH_SOCK'; } $this->config->setValue('projectroot', $projectRoot, FALSE); + $this->config->setValue('projectrootfiles', $projectRoot, FALSE); $this->config->setValue('projectdomain', str_replace('_', '-', $this->config->readValue('projectname')) . '.' . $traefik['domain'], FALSE); $this->config->setValue('projectprotocol', 'http' . ($traefik['usessl'] ? 's' : ''), FALSE); $this->config->setValue('socketprotocol', 'ws' . ($traefik['usessl'] ? 's' : ''), FALSE); @@ -633,6 +634,14 @@ class Handler extends BaseHandler { 'mailpitout.yml' => [ 'dest' => $projectRoot . '/tests', ], + 'hosts' => [ + 'source' => 'in/', + 'dest' => $projectRoot . '/in', + ], + 'in-vhost.conf' => [ + 'source' => 'in/', + 'dest' => $projectRoot . '/in', + ], ]; $files['cypress.config.js'] = [ 'source' => 'tests/', diff --git a/templates/in/hosts.twig b/templates/in/hosts.twig new file mode 100644 index 0000000..eaf5889 --- /dev/null +++ b/templates/in/hosts.twig @@ -0,0 +1 @@ +192.168.0.124 in5.test diff --git a/templates/in/in-vhost.conf.twig b/templates/in/in-vhost.conf.twig new file mode 100644 index 0000000..e99b6fd --- /dev/null +++ b/templates/in/in-vhost.conf.twig @@ -0,0 +1,27 @@ +server { + listen 80 default_server; + server_name _; + + client_max_body_size 100M; + + root /var/www/app/public/; + index index.php; + + location / { + try_files $uri $uri/ /index.php?$query_string; + } + + location = /favicon.ico { access_log off; log_not_found off; } + location = /robots.txt { access_log off; log_not_found off; } + + location ~ \.php$ { + fastcgi_split_path_info ^(.+\.php)(/.+)$; + fastcgi_pass in-app:9000; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_intercept_errors off; + fastcgi_buffer_size 16k; + fastcgi_buffers 4 16k; + } +} -- GitLab