Skip to content

Commit

Permalink
Update ddev config (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasnorre authored Mar 7, 2024
1 parent d2bd444 commit e0a6ecf
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 29 deletions.
3 changes: 3 additions & 0 deletions .devbox/.ddev/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@
/mutagen/.start-synced
/nginx_full/nginx-site.conf
/postgres/postgresql.conf
/providers/acquia.yaml
/providers/lagoon.yaml
/providers/platform.yaml
/providers/upsun.yaml
/sequelpro.spf
/settings/settings.ddev.py
/traefik/config/crawler-devbox.yaml
Expand Down
32 changes: 16 additions & 16 deletions .devbox/.ddev/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@ webserver_type: nginx-fpm
router_http_port: "80"
router_https_port: "443"
xdebug_enabled: false
additional_hostnames: []
additional_fqdns: []
additional_hostnames: [ ]
additional_fqdns: [ ]
database:
type: mariadb
version: "10.5"
nfs_mount_enabled: false
mutagen_enabled: false
hooks:
post-start:
- exec: echo '*/1 * * * * root TYPO3_CONTEXT=Development /usr/bin/php /var/www/html/bin/typo3
scheduler:run' | sudo tee -a /etc/cron.d/typo3
- exec: sudo chmod 0600 /etc/cron.d/typo3 && sudo service cron start
- exec: composer install -d /var/www/html
# Import and upgrade Database
- exec: /var/www/html/build-files/import-if-empty.sh
- exec: /var/www/html/bin/typo3 backend:lock
- exec: /var/www/html/bin/typo3 extension:setup
- exec: /var/www/html/bin/typo3 cache:flush
- exec: /var/www/html/bin/typo3 cache:warmup
- exec: /var/www/html/bin/typo3 backend:unlock
omit_containers: [ddev-ssh-agent]
webimage_extra_packages: [cron]
- exec: echo '*/1 * * * * root TYPO3_CONTEXT=Development /usr/bin/php /var/www/html/bin/typo3
scheduler:run' | sudo tee -a /etc/cron.d/typo3
- exec: sudo chmod 0600 /etc/cron.d/typo3 && sudo service cron start
- exec: composer install -d /var/www/html
# Import and upgrade Database
- exec: /var/www/html/build-files/import-if-empty.sh
- exec: /var/www/html/bin/typo3 backend:lock
- exec: /var/www/html/bin/typo3 extension:setup
- exec: /var/www/html/bin/typo3 cache:flush
- exec: /var/www/html/bin/typo3 cache:warmup
- exec: /var/www/html/bin/typo3 backend:unlock
omit_containers: [ dba, ddev-ssh-agent ]
webimage_extra_packages: [ cron ]
use_dns_when_possible: true
timezone: Europe/Copenhagen
composer_version: "2"
web_environment: []
web_environment: [ ]
nodejs_version: "16"

# Key features of ddev's config.yaml:
Expand Down
16 changes: 8 additions & 8 deletions .devbox/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
"issues": "https://github.com/tomasnorre/crawler/issues"
},
"require": {
"georgringer/news": "^9.0 || dev-11-12",
"georgringer/news": "^11.4",
"tnm/crawler-devbox-sitepackage": "^0.0.2",
"tomasnorre/crawler": "*@dev",
"typo3/cms-belog": "12.2.x-dev || dev-main" ,
"typo3/cms-beuser": "12.2.x-dev || dev-main",
"typo3/cms-felogin": "12.2.x-dev || dev-main",
"typo3/cms-indexed-search": "12.2.x-dev || dev-main",
"typo3/cms-info": "12.2.x-dev || dev-main",
"typo3/cms-tstemplate": "12.2.x-dev || dev-main",
"typo3/minimal": "12.2.x-dev || dev-main"
"typo3/cms-belog": "^12.4 || dev-main" ,
"typo3/cms-beuser": "^12.4 || dev-main",
"typo3/cms-felogin": "^12.4 || dev-main",
"typo3/cms-indexed-search": "^12.4 || dev-main",
"typo3/cms-info": "^12.4 || dev-main",
"typo3/cms-tstemplate": "^12.4 || dev-main",
"typo3/minimal": "^12.4 || dev-main"
},
"require-dev": {
"roave/security-advisories": "dev-latest"
Expand Down
2 changes: 1 addition & 1 deletion .devbox/config/system/additional.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
'processor_path' => '/usr/bin/',
'processor_path_lzw' => '/usr/bin/',
],
// This mail configuration sends all emails to mailhog
// This mail configuration sends all emails to mailpit
'MAIL' => [
'transport' => 'smtp',
'transport_smtp_encrypt' => false,
Expand Down
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ indent_size = 3
max_line_length = 80

[*.yml]
[*.yaml]
indent_size = 2
4 changes: 2 additions & 2 deletions .github/workflows/Acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- ^12.4
php:
- '8.1'
- '8.2'
#- '8.2' Disabled till green again, no need to run both if one is failing.

steps:
- name: Get branch name (merge)
Expand All @@ -43,7 +43,7 @@ jobs:
composer --version
- uses: actions/checkout@v3
- uses: jonaseberle/github-action-setup-ddev@v1
- uses: ddev/github-action-setup-ddev@v1
with:
ddevDir: ".devbox"
- name: CodeCeption
Expand Down
9 changes: 8 additions & 1 deletion Classes/Utility/HookUtility.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
*/

use AOE\Crawler\Hooks\ProcessCleanUpHook;
use Psr\Http\Message\ServerRequestInterface;
use TYPO3\CMS\Core\Http\ApplicationType;

/**
* @codeCoverageIgnore
Expand All @@ -42,7 +44,12 @@ public static function registerHooks($extKey): void
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$extKey]['refresh_hooks'][] =
ProcessCleanUpHook::class;

self::registerBackendHooks();
// Env-dependent
if (($GLOBALS['TYPO3_REQUEST'] ?? null) instanceof ServerRequestInterface
&& ApplicationType::fromRequest($GLOBALS['TYPO3_REQUEST'])->isBackend()
) {
self::registerBackendHooks();
}
}

private static function registerBackendHooks(): void
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"codeception/module-asserts": "^3.0",
"codeception/module-filesystem": "^3.0",
"codeception/module-phpbrowser": "^3.0",
"codeception/module-webdriver": "^3.0",
"codeception/module-webdriver": "^4.0",
"infection/infection": "^0.26",
"nikic/php-parser": "^4.13",
"phpspec/prophecy-phpunit": "^2.0",
Expand Down

0 comments on commit e0a6ecf

Please sign in to comment.