Skip to content

Commit

Permalink
Merge pull request #5 from oblakstudio/feat/qol-tweaks
Browse files Browse the repository at this point in the history
feat: Implementation improvement
  • Loading branch information
seebeen authored Apr 22, 2024
2 parents 97934a7 + 4332edc commit 39a6aff
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config.xhgui-pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

hooks:
post-start:
- exec: "cd /var/www/html/profiler > /dev/null || (mkdir -p /var/www/html/profiler && cd /var/www/html/profiler && composer require perftools/php-profiler)"
- exec: "cd /var/www/html/profiler > /dev/null || (mkdir -p /var/www/html/profiler && cd /var/www/html/profiler && COMPOSER_NO_DEV='1' COMPOSER_VENDOR_DIR='/var/www/html/profiler' composer require perftools/php-profiler -oa)"
10 changes: 5 additions & 5 deletions docker-compose.xhgui-pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ volumes:
com.ddev.site-name: ${DDEV_SITENAME}

services:
hxgui-ui:
xhgui-ui:
container_name: ddev-${DDEV_SITENAME}-xhgui-ui
image: xhgui/xhgui:latest
volumes:
Expand All @@ -35,10 +35,10 @@ services:
deploy:
resources:
limits:
cpus: "2"
cpus: "2.5"
memory: "1024M"
reservations:
cpus: "1"
cpus: "1.5"
memory: "512M"
restart: no
depends_on:
Expand Down Expand Up @@ -66,10 +66,10 @@ services:
deploy:
resources:
limits:
cpus: "2"
cpus: "2.5"
memory: "1024M"
reservations:
cpus: "1"
cpus: "1.5"
memory: "512M"
restart: no
healthcheck:
Expand Down
7 changes: 4 additions & 3 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,13 @@ project_files:
- config.xhgui-pro.yaml
- docker-compose.xhgui-pro.yaml

pre_install-actions:
post_install_actions:
- |
#ddev-description: Cleanup the auto-prepend-file
rm -f xhprof/xhprof_prepend.php
post_install_actions:
- |
#ddev-description: Cleanup the profiler package
rm -rf $DDEV_APPROOT/profiler
- |
#ddev-description: Create the auto-prepend-file
echo "<?php" > xhprof/xhprof_prepend.php && tail -n +3 ./xhgui/collector/xhprof_prepend.php >> xhprof/xhprof_prepend.php
Expand Down
6 changes: 3 additions & 3 deletions xhgui/collector/xhprof_prepend.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
return;
}

require_once '/var/www/html/profiler/vendor/autoload.php';
require_once '/var/www/html/profiler/autoload.php';

$config = [
'save.handler' => Profiler::SAVER_STACK,
Expand All @@ -22,9 +22,9 @@
'filename' => '/tmp/xhgui.data.jsonl',
],
'save.handler.upload' => [
'url' => 'http://hxgui-ui/run/import',
'url' => 'http://xhgui-ui/run/import',
'timeout' => 3,
'token' => getenv('XHGUI_UPLOAD_TOKEN', 'token'),
'token' => getenv('XHGUI_UPLOAD_TOKEN') ?: 'token',
],
'profiler.enable' => function () {
return true;
Expand Down
3 changes: 3 additions & 0 deletions xhgui/config/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ server {
listen [::]:80 default_server;
server_name xhgui;

client_max_body_size 128M;


root /var/www/xhgui/webroot;
index index.php;

Expand Down

0 comments on commit 39a6aff

Please sign in to comment.