Skip to content

Commit 70df6ff

Browse files
Update typo3.php (#4094)
* Update typo3.php * Add regenerated docs * refactor: remove tasks to remove * refactor: wrap composer in set config option * refactor: enable user to choose transfer method * chore: regenerated documentation * fix: apply php-cs-fixer * refactor: use absolute path to execute typo3 binary * refactor: remove effectless warm up * refactor: rename public dir and adjust shared / writable dirs * refactor: rename rsync task for more consistency * refactor: adjust exclude list * refactor: make shared files configurable * refactor: extend cache flush * refactor: reduce shared files * fix: revert rsync task renaming
1 parent 30742fc commit 70df6ff

File tree

2 files changed

+322
-46
lines changed

2 files changed

+322
-46
lines changed

docs/recipe/typo3.md

Lines changed: 178 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -28,38 +28,71 @@ Additionally, Deployer has a lot of other features, like:
2828
You can read more about Deployer in [Getting Started](/docs/getting-started.md).
2929

3030
The [deploy](#deploy) task of **TYPO3** consists of:
31-
* [deploy:prepare](/docs/recipe/common.md#deploy-prepare) – Prepares a new release
32-
* [deploy:info](/docs/recipe/deploy/info.md#deploy-info) – Displays info about deployment
33-
* [deploy:setup](/docs/recipe/deploy/setup.md#deploy-setup) – Prepares host for deploy
34-
* [deploy:lock](/docs/recipe/deploy/lock.md#deploy-lock) – Locks deploy
35-
* [deploy:release](/docs/recipe/deploy/release.md#deploy-release) – Prepares release
36-
* [deploy:update_code](/docs/recipe/deploy/update_code.md#deploy-update_code) – Updates code
37-
* [deploy:env](/docs/recipe/deploy/env.md#deploy-env) – Configure .env file
38-
* [deploy:shared](/docs/recipe/deploy/shared.md#deploy-shared) – Creates symlinks for shared files and dirs
39-
* [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable) – Makes writable dirs
31+
* [deploy:info](/docs/recipe/deploy/info.md#deploy-info) – Displays info about deployment
32+
* [deploy:setup](/docs/recipe/deploy/setup.md#deploy-setup) – Prepares host for deploy
33+
* [deploy:lock](/docs/recipe/deploy/lock.md#deploy-lock) – Locks deploy
34+
* [deploy:release](/docs/recipe/deploy/release.md#deploy-release) – Prepares release
35+
* [typo3:update_code](/docs/recipe/typo3.md#typo3-update_code)
36+
* [deploy:shared](/docs/recipe/deploy/shared.md#deploy-shared) – Creates symlinks for shared files and dirs
37+
* [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable) – Makes writable dirs
4038
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors) – Installs vendors
41-
* [deploy:publish](/docs/recipe/common.md#deploy-publish) – Publishes the release
42-
* [deploy:symlink](/docs/recipe/deploy/symlink.md#deploy-symlink) – Creates symlink to release
43-
* [deploy:unlock](/docs/recipe/deploy/lock.md#deploy-unlock) – Unlocks deploy
44-
* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploy-cleanup) – Cleanup old releases
45-
* [deploy:success](/docs/recipe/common.md#deploy-success) – Deploys your project
39+
* [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup) – TYPO3 - Cache warmup for system caches
40+
* [typo3:extension:setup](/docs/recipe/typo3.md#typo3-extension-setup) – TYPO3 - Set up all extensions
41+
* [typo3:language:update](/docs/recipe/typo3.md#typo3-language-update) – TYPO3 - Update the language files of all activated extensions
42+
* [typo3:cache:flush](/docs/recipe/typo3.md#typo3-cache-flush) – TYPO3 - Cache clearing for frontend caches
43+
* [typo3:cache:pages:warmup](/docs/recipe/typo3.md#typo3-cache-pages-warmup) – TYPO3 - Cache warmup for frontend caches
44+
* [deploy:unlock](/docs/recipe/deploy/lock.md#deploy-unlock) – Unlocks deploy
45+
* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploy-cleanup) – Cleanup old releases
46+
* [deploy:success](/docs/recipe/common.md#deploy-success) – Deploys your project
4647

4748

4849
The typo3 recipe is based on the [common](/docs/recipe/common.md) recipe.
4950

5051
## Configuration
52+
### composer_config
53+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L10)
54+
55+
56+
57+
```php title="Default value"
58+
return json_decode(file_get_contents('./composer.json'), true, 512, JSON_THROW_ON_ERROR);
59+
```
60+
61+
5162
### typo3_webroot
52-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L12)
63+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L17)
5364

5465
DocumentRoot / WebRoot for the TYPO3 installation
66+
:::info Autogenerated
67+
The value of this configuration is autogenerated on access.
68+
:::
69+
70+
71+
72+
73+
### bin/typo3
74+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L30)
75+
76+
Path to TYPO3 cli
77+
:::info Autogenerated
78+
The value of this configuration is autogenerated on access.
79+
:::
80+
81+
82+
83+
84+
### log_files
85+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L43)
86+
87+
Log files to display when running `./vendor/bin/dep logs:app`
5588

5689
```php title="Default value"
57-
'Web'
90+
'var/log/typo3_*.log'
5891
```
5992

6093

6194
### shared_dirs
62-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L27)
95+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L48)
6396

6497
Overrides [shared_dirs](/docs/recipe/deploy/shared.md#shared_dirs) from `recipe/deploy/shared.php`.
6598

@@ -69,27 +102,31 @@ Shared directories
69102
[
70103
'{{typo3_webroot}}/fileadmin',
71104
'{{typo3_webroot}}/typo3temp',
72-
'{{typo3_webroot}}/uploads',
105+
'var/session',
106+
'var/log',
107+
'var/lock',
108+
'var/charset',
73109
]
74110
```
75111

76112

77113
### shared_files
78-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L36)
114+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L60)
79115

80116
Overrides [shared_files](/docs/recipe/deploy/shared.md#shared_files) from `recipe/deploy/shared.php`.
81117

82118
Shared files
83119

84120
```php title="Default value"
85121
[
86-
'{{typo3_webroot}}/.htaccess',
122+
'config/system/settings.php',
123+
'.env',
87124
]
88125
```
89126

90127

91128
### writable_dirs
92-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L43)
129+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L68)
93130

94131
Overrides [writable_dirs](/docs/recipe/deploy/writable.md#writable_dirs) from `recipe/deploy/writable.php`.
95132

@@ -99,26 +136,139 @@ Writeable directories
99136
[
100137
'{{typo3_webroot}}/fileadmin',
101138
'{{typo3_webroot}}/typo3temp',
102-
'{{typo3_webroot}}/typo3conf',
103-
'{{typo3_webroot}}/uploads',
139+
'var',
140+
]
141+
```
142+
143+
144+
### composer_options
145+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L77)
146+
147+
Overrides [composer_options](/docs/recipe/deploy/vendors.md#composer_options) from `recipe/deploy/vendors.php`.
148+
149+
Composer options
150+
151+
```php title="Default value"
152+
' --no-dev --verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader'
153+
```
154+
155+
156+
### use_rsync
157+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L83)
158+
159+
If set in the config this recipe uses rsync. Default: false (use the Git repository)
160+
161+
```php title="Default value"
162+
false
163+
```
164+
165+
166+
### update_code_task
167+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L85)
168+
169+
170+
171+
```php title="Default value"
172+
return get('use_rsync') ? 'rsync' : 'deploy:update_code';
173+
```
174+
175+
176+
### rsync
177+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L112)
178+
179+
180+
181+
```php title="Default value"
182+
[
183+
'exclude' => array_merge(get('shared_dirs'), get('shared_files'), $exclude),
184+
'exclude-file' => false,
185+
'include' => ['vendor'],
186+
'include-file' => false,
187+
'filter' => ['dir-merge,-n /.gitignore'],
188+
'filter-file' => false,
189+
'filter-perdir' => false,
190+
'flags' => 'avz',
191+
'options' => ['delete', 'keep-dirlinks', 'links'],
192+
'timeout' => 600,
104193
]
105194
```
106195

107196

108197

109198
## Tasks
110199

200+
### typo3\:update_code {#typo3-update_code}
201+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L89)
202+
203+
204+
205+
206+
207+
208+
### typo3\:cache\:warmup {#typo3-cache-warmup}
209+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L126)
210+
211+
TYPO3 - Cache warmup for system caches.
212+
213+
214+
215+
216+
### typo3\:cache\:flush {#typo3-cache-flush}
217+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L132)
218+
219+
TYPO3 - Cache clearing for frontend caches.
220+
221+
222+
223+
224+
### typo3\:cache\:pages\:warmup {#typo3-cache-pages-warmup}
225+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L138)
226+
227+
TYPO3 - Cache warmup for frontend caches.
228+
229+
230+
231+
232+
### typo3\:language\:update {#typo3-language-update}
233+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L144)
234+
235+
TYPO3 - Update the language files of all activated extensions.
236+
237+
238+
239+
240+
### typo3\:extension\:setup {#typo3-extension-setup}
241+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L150)
242+
243+
TYPO3 - Set up all extensions.
244+
245+
246+
247+
111248
### deploy {#deploy}
112-
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L18)
249+
[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L159)
113250

114-
Deploys your project.
251+
Deploys a TYPO3 project.
115252

116-
Main TYPO3 task
253+
Configure "deploy" task group.
117254

118255

119256
This task is group task which contains next tasks:
120-
* [deploy:prepare](/docs/recipe/common.md#deploy-prepare)
257+
* [deploy:info](/docs/recipe/deploy/info.md#deploy-info)
258+
* [deploy:setup](/docs/recipe/deploy/setup.md#deploy-setup)
259+
* [deploy:lock](/docs/recipe/deploy/lock.md#deploy-lock)
260+
* [deploy:release](/docs/recipe/deploy/release.md#deploy-release)
261+
* [typo3:update_code](/docs/recipe/typo3.md#typo3-update_code)
262+
* [deploy:shared](/docs/recipe/deploy/shared.md#deploy-shared)
263+
* [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable)
121264
* [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors)
122-
* [deploy:publish](/docs/recipe/common.md#deploy-publish)
265+
* [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup)
266+
* [typo3:extension:setup](/docs/recipe/typo3.md#typo3-extension-setup)
267+
* [typo3:language:update](/docs/recipe/typo3.md#typo3-language-update)
268+
* [typo3:cache:flush](/docs/recipe/typo3.md#typo3-cache-flush)
269+
* [typo3:cache:pages:warmup](/docs/recipe/typo3.md#typo3-cache-pages-warmup)
270+
* [deploy:unlock](/docs/recipe/deploy/lock.md#deploy-unlock)
271+
* [deploy:cleanup](/docs/recipe/deploy/cleanup.md#deploy-cleanup)
272+
* [deploy:success](/docs/recipe/common.md#deploy-success)
123273

124274

0 commit comments

Comments
 (0)