Skip to content

Only present vhosts what have htdocs, example of override disabling a service#497

Closed
keithy wants to merge 4 commits into
cytopia:masterfrom
keithy:master
Closed

Only present vhosts what have htdocs, example of override disabling a service#497
keithy wants to merge 4 commits into
cytopia:masterfrom
keithy:master

Conversation

@keithy

@keithy keithy commented Feb 7, 2019

Copy link
Copy Markdown
Contributor

FEATURE_NAME

Goal

DESCRIPTION

if ($handle = opendir($docRoot)) {
while (false !== ($directory = readdir($handle))) {
if ($this->_is_valid_dir($docRoot . DIRECTORY_SEPARATOR . $directory) && $directory != '.' && $directory != '..') {
if ($this->_is_valid_dir($docRoot . DIRECTORY_SEPARATOR . $directory. "/". $htdocs) && $directory != '.' && $directory != '..') {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will make a big difference and should be discussed with the community.

Current behaviour:

  • Project exists, but does not have a vhost: Intranet will actually complain and let you know where to create the htdocs directory.

New behaviour:

  • Project exists, but does not have a vhost: Intranet will not show this vhost.

The current behaviour is helping people a lot to get started with the Devilbox. The new one will counteract this, but will allow more advanced people to hide stuff they intentionally want to hide.

@cytopia cytopia added the discussion Community discussion label Feb 7, 2019
@keithy

keithy commented Feb 9, 2019

Copy link
Copy Markdown
Contributor Author

I didnt consider your use case fully.
How about plan B) ignore any folders containing a .boxignore file (?)
or plan C) allow users to provide a .boxignore (json\yml] file that lists directories to ignore from the UI.
e.g. I use a packages directory to put shared code.

@cytopia

cytopia commented Feb 10, 2019

Copy link
Copy Markdown
Owner

@keithy that's a good idea I didn't even think about yet. What do you think about having that setting in .env as a comma separated string, such as:

DEVILBOX_UI_IGNORE=project1,another-project2,www.api

@keithy

keithy commented Feb 10, 2019

Copy link
Copy Markdown
Contributor Author

Hi, that works for me!

My use case was this... I discovered that the site I was working on was using include_path and had libraries in /usr/local/php so I needed to make them available in a shared place and the only place available that gets mounted into the php container is that directory itself /shared/httpd/

Then I started developing and used composers "path" repositories which are symlinked into the projects. Again the only sensible place to put shared resources was in that top directory.

So... your UI_IGNORE idea would do the trick. AND you could make it a wildcard.

DEVILBOX_UI_IGNORE=_*,package*,shared*

@cytopia

cytopia commented Feb 10, 2019

Copy link
Copy Markdown
Owner

Wildcard is even better 👍

@cytopia cytopia mentioned this pull request Mar 10, 2019
@stale

stale Bot commented Apr 28, 2019

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the issue:stale This issue has become stale and is marked for auto-close label Apr 28, 2019
@cytopia cytopia added the WIP label Apr 28, 2019
@stale stale Bot removed the issue:stale This issue has become stale and is marked for auto-close label Apr 28, 2019
@cytopia

cytopia commented Jan 4, 2020

Copy link
Copy Markdown
Owner

@keithy I will close this PR as it is almost 10 month old with no further commits.

@cytopia cytopia closed this Jan 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussion Community discussion WIP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants