Commit Graph
15 Commits
Author SHA1 Message Date
frommeandClaude Opus 5.5 f4e024a9f8 chore: slim deploy.php down to what every deploy needs
Removed the one-off tasks of the first deploys, all done now: host:check
(host checks before the first deploy, including the static vhosts),
typo3:secrets:init and typo3:secrets:check (secrets.php is filled in), and
typo3:settings:init (the shared settings.php exists since the deploy after
3f88229). Also removed what the Deployer 8 recipe already provides with the
same result: typo3/public_dir and bin/typo3 (read from composer.json),
typo3:extension:setup and the unlock after a failed deploy. The build always
runs through ddev exec, as deploys run on the host.

The resolved configuration (rsync excludes, flags and filter, shared and
writable directories, build path) and the task order are unchanged.
contrib/rsync.php replaces the recipe's rsync settings, so the recipe's
var/ exclude never applied: var/labels is deployed with the release, as
before.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-25 18:32:21 +01:00
frommeandClaude Opus 5.5 3f88229a70 feat: settings.php is shared on the server and no longer in git; production is leading
Every deploy replaced settings.php with the committed version, so changes
made in the production backend (extension configuration, install tool) were
lost with the next deploy or rollback. As LocalConfiguration.php on TYPO3 10,
it is now a shared file. typo3:settings:init seeds it once from the live
release; deploy:shared would otherwise seed it from the new release, i.e.
from git, and drop production's settings one last time.

The file is no longer tracked: it holds the encryptionKey and the install
tool password hash, and git has no use for it once production is leading.
Local copies stay in place (ignored).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 20:31:21 +02:00
frommeandClaude Opus 5.5 fcf04dbca7 chore: no delayed cache flush after deploys
Waiting 150 s at the end of every deploy is impractical. The flush right
after the switch stays; the window in which the previous release can
still fill the page cache is documented in deploy.php.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 15:03:23 +02:00
frommeandClaude Opus 5.5 4bfa0f258a fix: deploys flush the TYPO3 caches again after PHP has picked up the release
A vhost on current/public (alvac since today) keeps running the previous
release until PHP's realpath cache expires (120 s by default); pages it
rendered after the first flush stayed in the page cache with old paths.
A second flush 150 s after the switch (also after a rollback) removes them.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:45:36 +02:00
frommeandClaude Opus 5.5 419ffe42b8 fix: TYPO3 caches are flushed after a rollback too
Pages cached while the other release was live survived the switch
(seen after the rollback test: alvac served old favicon paths until a
manual cache:flush). The flush task runs in current_path, which is the
new release after a deploy and the previous one after a rollback.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:44:08 +02:00
frommeandClaude Opus 5.5 29f39fb440 fix: the release links fileadmin with a relative symlink
The vhosts answer 403 for files behind the absolute symlink (tested on
staging); Deployer's shared dirs are relative and work. The task now
also checks that the link resolves.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 14:23:26 +02:00
frommeandClaude Opus 5.5 f925c7f2d6 chore: commit the German language packs instead of fetching them on deploy
TYPO3's base distribution keeps var/labels in Git (!/var/labels in
.gitignore): the release build takes them from git archive, so deploys
no longer depend on the translation server. Update them with
"vendor/bin/typo3 language:update de" and commit the result.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 12:13:01 +02:00
frommeandClaude Opus 5.5 925e24397b feat: forms on TYPO3 13, loaded into the static pages with htmx
The static export replaced every EXT:form form with a contact notice. The
forms are back, rendered by TYPO3 13 and embedded in the static pages:

- Page type 1704 (/<page>/form) renders only the form plugin of a page,
  inside a .form-island element. Every form posts to that URL
  (renderingOptions.additionalParams), because on www the page URL is a
  static file that never reaches TYPO3. htmx swaps the island in place:
  validation errors, multi-step pages and confirmations. A redirect to an
  htmx request becomes HX-Redirect (HtmxRedirectMiddleware), so Redirect
  finishers send the browser to the thank-you page.
- While a request runs, an overlay with a spinner (as in MyE&P) covers
  the form. Styled inside the island: the static pages load the CSS of
  the TYPO3 10 export.
- The bw_captcha image comes from /<page>/captcha for the same reason.
  Both suffixes are in the PageType enhancer of every site with forms
  (semesterende gets one with default '' to keep its URLs).
- Ported from TYPO3 10: form setup, templates and partials, the MyE&P
  address finisher, the job application finisher with the MyE&P Team
  API client (epTeamApi* in secrets.php), the page URL/referrer finisher
  with ReferrerMiddleware (?ref=), the e-mail layout without the system
  footer, bw_captcha 5 and form_element_linked_checkbox 6. The address
  check forms are dropped.
- German language packs (EXT:form messages): availableLanguages = de,
  fetched on every deploy (typo3:language:update).
- The checkbox partials passed null to VHS' substring, which PHP 8.5
  reports as deprecated.
- DDEV no longer turns deprecations into exceptions, matching
  production: EXT:form's RenderFormValueViewHelper uses null as an array
  offset for empty optional fields (core bug, also in 13.4.37).

The static pages get their placeholders from the exporter in EP/website,
see .ddev/plans/static-export-form-islands.patch (local only).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 12:10:43 +02:00
fromme 59e4a2d49b chore: code cleanup 2026-10-22 11:10:37 +02:00
frommeandClaude Opus 5.5 bb1901fed6 fix: build theme assets before composer install
Composer publishes an extension's Resources/Public as public/_assets/<hash>
only if the directory exists when it runs. The theme's is created by the
asset build, so it has to run first; otherwise the release has no
_assets link for ep_theme and the theme CSS/JS answer 404. The build now
checks the link.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 19:18:47 +02:00
frommeandClaude Opus 5.5 4a9777c56a fix: deploy from the host, build inside DDEV
dep runs on the host with its SSH keys; the build (composer install,
npm ci, npm run build) runs through ddev exec, so Composer and Node are
the project's versions. Inside DDEV the commands run directly.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 19:10:03 +02:00
frommeandClaude Opus 5.5 64aa43c5af fix: define the TYPO3 deploy tasks in deploy.php
The recipe's task names differ between Deployer versions; with a
globally installed dep the deploy failed with 'Task
typo3:extension:setup not found'.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 18:55:30 +02:00
frommeandClaude Opus 5.5 178a5e6c14 feat: first deploy sets up the shared paths and the secrets template
typo3:secrets:init uploads secrets.example.php into shared/ when no
secrets.php exists (never overwrites one); typo3:secrets:check stops
the deploy before extension:setup while the database connection is
still missing. So the first "dep deploy prod" creates the structure and
stops before anything goes live.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 18:52:41 +02:00
frommeandClaude Opus 5.5 f6307d7552 fix: hybrid deploy without OPcache tool, tolerant of missing secrets
- No cachetool: its web adapter needs PHP below www.ep-reisen.de/typo3temp,
  which is the static docroot in the hybrid setup (blocked, and not the
  release's typo3temp). Not needed: the exporter's front controller stubs
  resolve the "current" symlink with readlink() on every request.
- additional.php only merges secrets.php when it returns an array:
  Deployer creates an empty shared file on the first deploy.
- public/.htaccess sets TYPO3_CONTEXT=Production/Staging for
  staging.ep-reisen.de, the smoke-test vhost.
- dep host:check: read-only checks of the host before the first deploy.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 18:08:17 +02:00
frommeandClaude Opus 5.5 214b4b6b86 chore: Deployer configuration for the production host
Built locally from the committed state (git archive, composer install
--no-dev, theme build) and synced with rsync, so the host needs neither
Composer nor Node. Shared: secrets.php, logs, locks, typo3temp/assets
and the MyE&P import baseline. fileadmin links to the production
fileadmin of the TYPO3 10 release, which the CDN origin serves.
extension:setup before the switch, OPcache and TYPO3 caches after it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-21 16:23:41 +02:00