jokkedk / webgrind

Xdebug Profiling Web Frontend in PHP
Other
3.28k stars 411 forks source link

Webgrind docker host directory conflicts with project's host directory #186

Open frob opened 4 months ago

frob commented 4 months ago

Currently Webgrind uses /var/www/html to host the project in docker. This is fine until someone wants to click this view source button. If the dockerfile for webgrind was updated to make webgrind operate in an alternate host directory then I wouldn't have to update anything in my project to view the source.

I suggest /var/www/webgrind as the host directory.

This would require a couple of changes in the dockerfile according to the php docker docs

ENV APACHE_DOCUMENT_ROOT /path/to/new/root

RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf