Upgrade to Pro — share decks privately, control downloads, hide ads and more …

T3CL25: Cloud-Native TYPO3

T3CL25: Cloud-Native TYPO3

This talk will show you how to run TYPO3 in cloud environments using containers and Kubernetes. We’ll cover how to properly run TYPO3 in a container, set up persistent storage, handle configuration, and deploy using tools like Helm. The goal is to make TYPO3 work reliably in scalable, cloud-native setups without unnecessary complexity. Whether you’re moving an existing site or starting fresh, you’ll learn practical steps to get TYPO3 running smoothly on Kubernetes.

Avatar for Martin Helmich

Martin Helmich

October 07, 2025
Tweet

More Decks by Martin Helmich

Other Decks in Technology

Transcript

  1. MARTIN HELMICH mittwald Head of Architecture & Developer Relations TYPO3

    Association Board Member PHWT Lecturer, Software Engineering & Cloud Computing
  2. Cloud native applications are specifically designed to take advantage of

    innovations in cloud computing. “ ” — Cloud Native Computing Foundation Built with the ‘cloud’ in mind “ ” — some bloke on Reddit
  3. Your application is running in the cloud [and] you do

    not care about managing specific machines. [… ] You schedule your apps to run, and they run somewhere. “ ” — some other bloke on Reddit Every bit of infrastructure and application configuration is captured in a desired-state configuration language. High availability, and high durability. Design your application under the assumption that anything can (and will) fail. “ “ ” ” Cloud native applications are specifically designed to take advantage of inno “ ind
  4. The smaller your deployment increments, the less waste IN CONSEQUENCE

    : Cloud-native applications require SMALL DEPLOYMENT UNITS and FAST STARTUP TIMES to leverage the elasticity of cloud environments
  5. apiVersion: apps/v1 kind: Deployment metadata: name: typo3-example spec: replicas: 1

    selector: matchLabels: app.kubernetes.io/name: typo3 template: metadata: labels: app.kubernetes.io/name: typo3 spec: containers: - name: typo3 image: martinhelmich/typo3:13 ports: - containerPort: 80 From the DEVOPS TOOLBOX : Apply software engineering practices to infrastructure operations. _ Store INFRASTRUCTURE AS CODE (incl. versioning, code review, etc.) _ AUTOMATE your deployment just as you would automate your build
  6. WEBSERVER + TYPO3 DATABASE WEBSERVER + TYPO3 WEBSERVER + TYPO3

    STATE STATE STATE $ kubectl scale deployment typo3-example -- replicas=3 STATE in TYPO3 deployments: _ User uploads _ Caches SIDE NOTE Not part of the STATE (should be part of the deployment unit): _ Extensions _ Configuration
  7. In a production site, you (or anybody) should have no

    excuse whatsoever to use the install tool or the extension manager
  8. DATABASE OBJECT STORE CACHE STATE STATE WEBSERVER + WEBSERVER +

    TYPO3 OBJECTIVE Make any deployment units that should be scaled out STATELESS
  9. KNOW YOUR CACHES _ Which caches need to be consistent

    across multiple deployment units? Examples: _ page cache _ assets These need to be SHARED CACHES! _ Which cache contents depend on parts of your deployment unit? Examples: _ fluid templates _ typoscript _ l10n _ opcache ( PHP ) These are OK to remain separate _ CAUTION : Extensions may add more caches. You need to worry about those, too.
  10. $redisHost = getenv("TYPO3_REDIS_HOST"); $redisPort = 6379; $redisCaches = [ 'pages'

    => [ 'defaultLifetime' => 86400 * 7, // 1 week 'compression' => true, ], 'pagesection' => [ 'defaultLifetime' => 86400 * 7, ], 'hash' => [], 'rootline' => [], ];
  11. $redisDatabase = 0; foreach ($redisCaches as $name => $values) {

    $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$name]['backend'] = \TYPO3\CMS\Core\Cache\Backend\RedisBackend::class; $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$name]['options'] = [ 'database' => $redisDatabase++, 'hostname' => $redisHost, 'port' => $redisPort, ]; if (isset($values['defaultLifetime'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$name]['options']['defaultLifetime'] = $values['defaultLifetime']; } if (isset($values['compression'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$name]['options']['compression'] = $values['compression']; } } ], 'pagesection' => [ 'defaultLifetime' => 86400 * 7, ], 'hash' => [], 'rootline' => [], ];
  12. if (isset($values['defaultLifetime'])) { $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$name]['options']['defaultLifetime'] = $values['defaultLifetime']; } if (isset($values['compression'])) {

    $GLOBALS['TYPO3_CONF_VARS']['SYS']['caching']['cacheConfigurations'][$name]['options']['compression'] = $values['compression']; } } $GLOBALS['TYPO3_CONF_VARS']['SYS']['session']['FE'] = [ 'backend' => \TYPO3\CMS\Core\Session\Backend\RedisSessionBackend::class, 'options' => [ 'hostname' => $redisHost, 'database' => $redisDatabase++, 'port' => $redisPort ] ]; $GLOBALS['TYPO3_CONF_VARS']['SYS']['session']['BE'] = [ 'backend' => \TYPO3\CMS\Core\Session\Backend\RedisSessionBackend::class, 'options' => [ 'hostname' => $redisHost, 'database' => $redisDatabase++, 'port' => $redisPort ] ];
  13. ] ]; $GLOBALS['TYPO3_CONF_VARS']['SYS']['session']['BE'] = [ 'backend' => \TYPO3\CMS\Core\Session\Backend\RedisSessionBackend::class, 'options' =>

    [ 'hostname' => $redisHost, 'database' => $redisDatabase++, 'port' => $redisPort ] ]; $GLOBALS['TYPO3_CONF_VARS']['BE']['installToolSessionHandler'] = [ 'className' => \TYPO3\CMS\Install\Service\Session\RedisSessionHandler::class, 'options' => [ 'host' => $redisHost, 'database' => $redisDatabase++, 'port' => $redisPort ] ]; NEW IN v14 🤩 https://docs.typo3.org/permalink/changelog:feature-101059 - 1751729746
  14. SCALING DATABASES? DON'T _ ACID and CAP have entered the

    chat: Master/master replication is HARD! _ Use Galera ( MySQL ) if you absolutely have to _ When using PostgreSQL, check out CockroachDB
  15. SCALING DATABASES? DON'T _ Use Galera ( MySQL ) if

    you absolutely have to _ When using PostgreSQL, check out CockroachDB _ Use Redis caches to reduce read load on your database servers (and then scale out the Redis servers if needed) _ Use an active/passive setup w/ failover to achieve HA for MySQL or PostgreSQL (if needed) _ On K8S, check out MOCO (https:// github.com/cybozu-go/moco)
  16. https://unsplash.com/photos/red-and-blue-cargo-ship-on-body-of-water-during-daytime-NndKt2kF1L4 TYPO3 AND DOCKER!? RELATIONSHIP STATUS : It’s complicated STARTING

    POINTS _ https://github.com/martin-helmich/docker-typo3 For demo purposes; “classic” setup, no focus on scalability and/or statelessness whatsoever _ https://github.com/martin-helmich/docker-typo3-cloud Opinionated image with cloud-native best practices WORK IN PROGRESS _ Possible TYPO3 CLOUD NATIVE INITIATIVE? Visit Anja Scharfenbergs talk at T3CON25.
  17. https://www.mittwald.de/karriere WE’RE HIRING Developer Relations Engineer Infrastructure Engineer CMS Support

    Engineer Product Owner CMS Hosting CMS Product Marketing Manager (all genders, on-site) MARTIN HELMICH [email protected] [email protected]