File tree Expand file tree Collapse file tree
src/Environment/Command/Container Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ class Php extends Container
1212 [
1313 'active ' => true ,
1414 'container_name ' => 'project_php ' ,
15+ 'relative_webroot_dir ' => '' ,
1516 'ports ' => [
1617 '80:80 '
1718 ],
@@ -89,6 +90,18 @@ protected function askQuestions()
8990
9091 $ this ->_config ['environment ' ]['VIRTUAL_HOST ' ] = '. ' . $ dockername . '.docker ' ;
9192
93+
94+ $ useCustomWebroot = false ;
95+
96+ $ this ->askYesNoQuestion (
97+ 'Use custom webroot ' ,
98+ $ useCustomWebroot
99+ );
100+
101+ if ($ useCustomWebroot ) {
102+ $ this ->_editCustomWebroot ();
103+ }
104+
92105 $ editEnvironmentVariables = false ;
93106
94107 $ this ->askYesNoQuestion (
@@ -178,4 +191,16 @@ private function _addEnvironmentVariables()
178191 // offer to add another
179192 $ this ->_addEnvironmentVariables ();
180193 }
194+
195+ private function _editCustomWebroot ()
196+ {
197+ $ this ->askQuestion (
198+ 'What is the webroot directory, relative to `src` directory (e.g. web) ' ,
199+ $ this ->_config ['relative_webroot_dir ' ],
200+ ''
201+ );
202+ }
203+
204+
205+
181206}
You can’t perform that action at this time.
0 commit comments