Skip to content

Instantly share code, notes, and snippets.

@a-r-m-i-n
Last active August 29, 2020 19:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save a-r-m-i-n/6aa83e7006b606e2e31e059c32bed7f2 to your computer and use it in GitHub Desktop.
Save a-r-m-i-n/6aa83e7006b606e2e31e059c32bed7f2 to your computer and use it in GitHub Desktop.
Example composer.json and DDEV config.yaml for a TYPO3 CMS extension, running in a local environment
$ ddev start
$ ddev composer install
$ ddev composer run typo3
{
"name": "vendor/my-ext",
"type": "typo3-cms-extension",
"keywords": [
"TYPO3",
"extension"
],
"homepage": "https://v.ieweg.de",
"authors": [
{
"name": "Armin Vieweg",
"role": "Developer",
"email": "info@v.ieweg.de",
"homepage": "https://v.ieweg.de"
}
],
"license": [
"GPL-2.0-or-later"
],
"require": {
"typo3/cms-core": "^10.4.2"
},
"require-dev": {
"t3/cms": "^10.4"
},
"autoload": {
"psr-4": {
"Vendor\\MyExt\\": "Classes"
}
},
"replace": {
"typo3-ter/my-ext": "self.version"
},
"config": {
"platform": {
"php": "7.4.9"
},
"vendor-dir": ".Build/vendor",
"bin-dir": ".Build/bin"
},
"extra": {
"typo3/cms": {
"extension-key": "my_ext",
"cms-package-dir": "{$vendor-dir}/typo3/cms",
"web-dir": ".Build/public",
"app-dir": ".Build"
}
},
"scripts": {
"post-autoload-dump": [
"@typo3-cleanup"
],
"typo3": [
"@typo3-install",
"@typo3-setup",
"@typo3-cleanup"
],
"typo3-install": [
"@putenv TYPO3_INSTALL_DB_DRIVER=mysqli",
"@putenv TYPO3_INSTALL_DB_HOST=db",
"@putenv TYPO3_INSTALL_DB_NAME=typo3",
"@putenv TYPO3_INSTALL_DB_PORT=3306",
"@putenv TYPO3_INSTALL_DB_USER=root",
"@putenv TYPO3_INSTALL_DB_PASSWORD=root",
"@putenv TYPO3_INSTALL_DB_USE_EXISTING=0",
"@putenv TYPO3_INSTALL_WEB_SERVER_CONFIG=apache",
"@putenv TYPO3_INSTALL_SITE_SETUP_TYPE=site",
"@putenv TYPO3_INSTALL_SITE_NAME=EXT:my_ext Dev Environment",
"@putenv TYPO3_INSTALL_ADMIN_USER=admin",
"@putenv TYPO3_INSTALL_ADMIN_PASSWORD=password",
"typo3cms install:setup -n --database-name=typo3",
"ln -s /var/www/html/ /var/www/html/.Build/public/typo3conf/ext/my_ext"
],
"typo3-setup": [
"typo3cms configuration:set 'BE/debug' 1",
"typo3cms configuration:set 'FE/debug' 1",
"typo3cms configuration:set 'SYS/devIPmask' '*'",
"typo3cms configuration:set 'SYS/displayErrors' 1",
"typo3cms configuration:set 'SYS/trustedHostsPattern' '.*.*'",
"typo3cms configuration:set 'MAIL/transport' 'smtp'",
"typo3cms configuration:set 'MAIL/transport_smtp_server' 'localhost:1025'",
"typo3cms configuration:set 'GFX/processor' 'ImageMagick'",
"typo3cms configuration:set 'GFX/processor_path' '/usr/bin/'",
"typo3cms configuration:set 'GFX/processor_path_lzw' '/usr/bin/'"
],
"typo3-cleanup": [
"typo3cms install:generatepackagestates",
"typo3cms cache:flush"
]
}
}
# .ddev/config.yaml
name: my-ext
type: php
docroot: ./.Build/public/
php_version: "7.4"
webserver_type: apache-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
provider: default
use_dns_when_possible: true
working_dir:
web: /var/www/html/.Build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment