File tree 3 files changed +80
-0
lines changed
3 files changed +80
-0
lines changed Original file line number Diff line number Diff line change 1
1
.DS_Store
2
+ .ddev
2
3
/generator /vendor
3
4
/generator /composer.phar
4
5
/app /vendor
Original file line number Diff line number Diff line change @@ -52,6 +52,26 @@ locally by adding this to your `local.php`:
52
52
define('DISABLE_INCLUDE', true);
53
53
```
54
54
55
+ ## Run a DDEV environment for Developer documentation
56
+
57
+ DDEV container for the Matomo Developer Documentation site
58
+
59
+ To start this on your local machine using ddev run the command below.
60
+
61
+ ``` bash
62
+ bash ddev-developer-docs.sh
63
+ ```
64
+
65
+ The local DDEV url for this container will be https://devdocs.ddev.site/
66
+
67
+ ### Rebuilding
68
+
69
+ If you want to completely clear the existing setup and start again the following command will reset everything
70
+
71
+ ``` bash
72
+ ddev stop --unlist devdocs && rm -rf .ddev && bash ddev-developer-docs.sh
73
+ ```
74
+
55
75
## Automatic documentation generation (API-Reference)
56
76
57
77
### The first time
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # ###########################################################
4
+ # Help #
5
+ # ###########################################################
6
+ Help ()
7
+ {
8
+ # Display Help
9
+ echo " DDEV setup script for Developer Documentation"
10
+ echo
11
+ echo " Syntax: scriptTemplate [-w|h]"
12
+ echo " options:"
13
+ echo " a Audit for security vulnerability advisories"
14
+ echo " h Print this Help."
15
+ echo
16
+ }
17
+
18
+ Audit ()
19
+ {
20
+ ddev exec -d /var/www/html/app composer audit --locked 2> /dev/null
21
+ }
22
+
23
+ while getopts " :b:ah" option; do
24
+ case $option in
25
+ a) # display security vulnerability advisories
26
+ Audit
27
+ exit ;;
28
+ h) # display Help
29
+ Help
30
+ exit ;;
31
+ esac
32
+ done
33
+
34
+ # Setup ddev if it has not been done yet
35
+ if test -d .ddev; then
36
+ echo " DDEV already setup"
37
+ else
38
+ ddev config --project-name=devdocs --project-type=php --docroot=" app/public" --php-version=8.2 \
39
+ --webserver-type=apache-fpm --composer-version=2 --corepack-enable=false --xdebug-enabled=false
40
+ fi
41
+
42
+ # cp ddev-config-local.php app/config/local.php
43
+
44
+ ddev start
45
+ ddev exec -d /var/www/html/app composer install
46
+ if test -d app/tmp/cache; then
47
+ echo " Cache directory already created"
48
+ else
49
+ ddev exec -d /var/www/html/app mkdir tmp/cache
50
+ fi
51
+
52
+ if test -d app/tmp/templates; then
53
+ echo " Template directory already created"
54
+ else
55
+ ddev exec -d /var/www/html/app mkdir tmp/templates
56
+ fi
57
+
58
+ Audit
59
+ # ddev exec -d /var/www/html/www/app/public php -q -S 0.0.0.0:8000
You can’t perform that action at this time.
0 commit comments