generated from ddev/ddev-addon-template
-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
config.xhgui.yaml
29 lines (29 loc) · 1.12 KB
/
config.xhgui.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#ddev-generated
hooks:
post-start:
# Create a new database called "xhgui"
- exec: |
if [[ "$DDEV_DATABASE_FAMILY" == "postgres" ]]; then
echo "SELECT 'CREATE DATABASE xhgui' WHERE NOT EXISTS (SELECT FROM pg_database WHERE datname = 'xhgui')\gexec" | psql > /dev/null
else
mysql -uroot -proot -e "CREATE DATABASE IF NOT EXISTS xhgui; GRANT ALL ON xhgui.* to 'db'@'%';"
fi
service: db
- exec: |
cat <<-EOF > .ddev/xhprof/xhprof_prepend.php
<?php
// DDEV's built in xhprof handler breaks our own.
// We'll temporarily override it here, but return control back later.
// If you don't want this behavior, comment out the hooks in ".ddev/config.xhgui.yaml".
return;
EOF
pre-stop:
- exec: |
cat <<-EOF > .ddev/xhprof/xhprof_prepend.php
<?php
// #ddev-generated
// We'll give back control of this file to DDEV. Next time it checks, it will see it has ownership
// and override this file with the current default.
// If you don't want this behavior, comment out the hooks in .ddev/config.xhgui.yaml.
return;
EOF