diff --git a/src/Handler.php b/src/Handler.php index 89fd8b08cc45b35f04272a364e6e4b0820b486f5..f8c18cac3c31b637b72e004cf114d2ef465354d3 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 0000000000000000000000000000000000000000..eaf588906baedd490977f6de9b8f4f9ad4db687d --- /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 0000000000000000000000000000000000000000..e99b6fd72bc20cf68e66d208d37899021d3df15b --- /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; + } +}