Skip to content

Commit

Permalink
Fix installation, startup, and other first-run errors
Browse files Browse the repository at this point in the history
  • Loading branch information
deviantintegral authored and tyler36 committed Nov 7, 2023
1 parent 8e61709 commit cc3d88a
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Take into account that with the default configuration, every time you `ddev star
The service will automatically start when run: `ddev start` or `ddev restart`.
By default, xhgui will be available at <http://>`<your site>`:8282. Note that it's http only.
By default, xhgui will be available at <https://>`<your site>`:8143.
Remember, if you updated `settings.ddev.php` or `wp-config-ddev.php`, these file will be overwritten unless you remove the `#ddev-generated`.
Expand Down
13 changes: 9 additions & 4 deletions docker-compose.xhgui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
services:
xhgui:
# https://hub.docker.com/r/xhgui/xhgui/tags
image: xhgui/xhgui:latest
build:
dockerfile: Dockerfile
context: xhgui
container_name: ddev-${DDEV_SITENAME}-xhgui
labels:
com.ddev.site-name: ${DDEV_SITENAME}
Expand All @@ -12,12 +14,15 @@ services:
- ./xhgui/nginx.conf:/etc/nginx/http.d/default.conf:ro
- ./xhgui/xhgui.config.php:/var/www/xhgui/config/config.php
environment:
- VIRTUAL_HOST=$DDEV_HOSTNAME
- HTTP_EXPOSE=8142:80
- HTTPS_EXPOSE=8143:80
- XHGUI_MONGO_HOSTNAME=xhgui-mongo
- XHGUI_MONGO_DATABASE=xhprof
ports:
- "8142:80"
links:
- xhgui-mongo
depends_on:
- xhgui-mongo

web:
links:
Expand All @@ -27,7 +32,7 @@ services:

xhgui-mongo:
# https://hub.docker.com/r/percona/percona-server-mongodb/tags
image: percona/percona-server-mongodb:3.6
image: percona/percona-server-mongodb:6.0-multi
container_name: ddev-${DDEV_SITENAME}-xhgui-mongo
command: --storageEngine=wiredTiger
restart: always
Expand Down
5 changes: 3 additions & 2 deletions install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,9 @@ pre_install_actions:
# DDEV environment variables can be interpolated into these filenames
project_files:
- docker-compose.xhgui.yaml
- xhgui/config.default.php
- xhgui/Dockerfile
- xhgui/xhgui.config.php
- xhgui/examples/xhgui.collector.config.php
- xhgui/examples/xhgui.collector.php
- xhgui/nginx.conf
- xhgui-mongo/xhgui.js
- xhprof/xhprof_prepend.php
1 change: 1 addition & 0 deletions xhgui-mongo/mongo.init.d
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#ddev-generated
db.results.ensureIndex( { 'meta.SERVER.REQUEST_TIME' : -1 } );
db.results.ensureIndex( { 'profile.main().wt' : -1 } );
db.results.ensureIndex( { 'profile.main().mu' : -1 } );
Expand Down
3 changes: 3 additions & 0 deletions xhgui/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM xhgui/xhgui:latest

RUN echo 'memory_limit=512M' >> $PHP_INI_DIR/conf.d/99-memory-limit.ini
1 change: 1 addition & 0 deletions xhgui/examples/xhgui.collector.config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php
#ddev-generated

/**
* @file
Expand Down
1 change: 1 addition & 0 deletions xhgui/examples/xhgui.collector.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

#ddev-generated
/**
* @file
*/
Expand Down
5 changes: 5 additions & 0 deletions xhprof/xhprof_prepend.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?php

// ddev's built in xhprof handler breaks our own. If we leave ddev-generated in
// this file, then ddev xhprof will overwrite this file.
return;

0 comments on commit cc3d88a

Please sign in to comment.