Initial commit
This commit is contained in:
31
assets/templates/config.yaml
Normal file
31
assets/templates/config.yaml
Normal file
@@ -0,0 +1,31 @@
|
||||
name: {{DDEV_SITENAME}}
|
||||
type: php
|
||||
docroot: ""
|
||||
no_project_mount: true
|
||||
php_version: "8.2"
|
||||
composer_version: "2"
|
||||
webserver_type: apache-fpm
|
||||
router_http_port: "80"
|
||||
router_https_port: "443"
|
||||
xdebug_enabled: false
|
||||
additional_hostnames:
|
||||
- docs.{{DDEV_SITENAME}}
|
||||
- v11.{{DDEV_SITENAME}}
|
||||
- v12.{{DDEV_SITENAME}}
|
||||
- v13.{{DDEV_SITENAME}}
|
||||
additional_fqdns: []
|
||||
use_dns_when_possible: true
|
||||
webimage_extra_dockerfiles:
|
||||
- web-build
|
||||
hooks:
|
||||
post-start:
|
||||
- exec-host: |
|
||||
# Capture git info and write to container automatically on every ddev start
|
||||
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "unknown")
|
||||
COMMIT=$(git rev-parse --short HEAD 2>/dev/null || echo "unknown")
|
||||
PR=$(gh pr view --json number -q .number 2>/dev/null || echo "unknown")
|
||||
|
||||
# Write git info as JSON to web container
|
||||
ddev exec "printf '{\"branch\":\"%s\",\"commit\":\"%s\",\"pr\":\"%s\"}' '$BRANCH' '$COMMIT' '$PR' > /var/www/html/.git-info.json"
|
||||
|
||||
echo "📋 Git info updated: Branch=$BRANCH, Commit=$COMMIT, PR=$PR"
|
||||
Reference in New Issue
Block a user