From 760b8013764aeaac22279079203f9aa0248875c7 Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Sat, 15 Jul 2023 16:42:09 +0200 Subject: [PATCH 1/2] Add TYPO3 12 --- .github/workflows/verify-12.4.yml | 29 ++++++++++++ .updater.yaml | 13 +++++- 11.5/Dockerfile | 2 +- 12.4/Dockerfile | 73 +++++++++++++++++++++++++++++++ 12.4/docker-compose.yml | 48 ++++++++++++++++++++ README.md | 3 +- 6 files changed, 164 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/verify-12.4.yml create mode 100644 12.4/Dockerfile create mode 100644 12.4/docker-compose.yml diff --git a/.github/workflows/verify-12.4.yml b/.github/workflows/verify-12.4.yml new file mode 100644 index 0000000..fa82cfa --- /dev/null +++ b/.github/workflows/verify-12.4.yml @@ -0,0 +1,29 @@ +name: Build and test TYPO3 12.4 image + +on: + push: + paths: + - '12.4/Dockerfile' + - '12.4/docker-compose.yml' + pull_request: + paths: + - '12.4/Dockerfile' + - '12.4/docker-compose.yml' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Build and start image + run: | + cd 12.4 + docker-compose build + docker-compose up -d + + sleep 20 + + curl -vLf http://localhost + docker-compose down -v diff --git a/.updater.yaml b/.updater.yaml index c2f2677..84e7c8e 100644 --- a/.updater.yaml +++ b/.updater.yaml @@ -1,4 +1,13 @@ versions: + - major: 12 + constraint: ~12.4.0 + destination: "12.4" + template: ./updater/Dockerfile.tmpl + templateData: + PHP: + Major: 8 + Minor: 2 + Debian: bookworm - major: 11 constraint: ~11.5.0 destination: "11.5" @@ -6,8 +15,8 @@ versions: templateData: PHP: Major: 8 - Minor: 0 - Debian: buster + Minor: 2 + Debian: bookworm - major: 10 constraint: ~10.4.0 destination: "10.4" diff --git a/11.5/Dockerfile b/11.5/Dockerfile index 27ab9ff..cfe198e 100644 --- a/11.5/Dockerfile +++ b/11.5/Dockerfile @@ -15,7 +15,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see . -FROM php:8.0-apache-buster +FROM php:8.2-apache-bookworm LABEL maintainer="Martin Helmich " # Install TYPO3 diff --git a/12.4/Dockerfile b/12.4/Dockerfile new file mode 100644 index 0000000..ea8d6f7 --- /dev/null +++ b/12.4/Dockerfile @@ -0,0 +1,73 @@ +# Docker image for TYPO3 CMS +# Copyright (C) 2016-2020 Martin Helmich +# and contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +FROM php:8.2-apache-bookworm +LABEL maintainer="Martin Helmich " + +# Install TYPO3 +RUN apt-get update && \ + apt-get upgrade -y && \ + apt-get install -y --no-install-recommends \ + wget \ +# Configure PHP + libxml2-dev libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng-dev \ + libpq-dev \ + libzip-dev \ + zlib1g-dev \ +# Install required 3rd party tools + graphicsmagick && \ +# Configure extensions + docker-php-ext-configure gd --with-libdir=/usr/include/ --with-jpeg --with-freetype && \ + docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl pgsql pdo_pgsql && \ + echo 'always_populate_raw_post_data = -1\nmax_execution_time = 240\nmax_input_vars = 1500\nupload_max_filesize = 32M\npost_max_size = 32M' > /usr/local/etc/php/conf.d/typo3.ini && \ +# Configure Apache as needed + a2enmod rewrite && \ + apt-get clean && \ + apt-get -y purge \ + libxml2-dev libfreetype6-dev \ + libjpeg62-turbo-dev \ + libmcrypt-dev \ + libpng-dev \ + libzip-dev \ + zlib1g-dev && \ + rm -rf /var/lib/apt/lists/* /usr/src/* + +RUN cd /var/www/html && \ + wget -O download.tar.gz https://get.typo3.org/12.4.3 && \ + echo "a943f03a9746e49123ca1dee1e7f00b62ac33871310c914cefd1a312141ae578 download.tar.gz" > download.tar.gz.sum && \ + sha256sum -c download.tar.gz.sum && \ + tar -xzf download.tar.gz && \ + rm download.* && \ + ln -s typo3_src-* typo3_src && \ + ln -s typo3_src/index.php && \ + ln -s typo3_src/typo3 && \ + cp typo3/sysext/install/Resources/Private/FolderStructureTemplateFiles/root-htaccess .htaccess && \ + mkdir typo3temp && \ + mkdir typo3conf && \ + mkdir fileadmin && \ + mkdir uploads && \ + touch FIRST_INSTALL && \ + chown -R www-data. . + +# Configure volumes +VOLUME /var/www/html/fileadmin +VOLUME /var/www/html/typo3conf +VOLUME /var/www/html/typo3temp +VOLUME /var/www/html/uploads diff --git a/12.4/docker-compose.yml b/12.4/docker-compose.yml new file mode 100644 index 0000000..4b1ce24 --- /dev/null +++ b/12.4/docker-compose.yml @@ -0,0 +1,48 @@ +# Docker image for TYPO3 CMS +# Copyright (C) 2016-2020 Martin Helmich +# and contributors +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +version: "3" +services: + typo3: + build: . + ports: + - "80:80" + volumes: + - fileadmin:/var/www/html/fileadmin + - typo3conf:/var/www/html/typo3conf + - uploads:/var/www/html/uploads + networks: + - backend + database: + image: mysql:8.0 + command: + - --character-set-server=utf8 + - --collation-server=utf8_unicode_ci + environment: + - "MYSQL_USER=${MYSQL_USER:-typo3}" + - "MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}" + - "MYSQL_DATABASE=${MYSQL_DATABASE:-typo3}" + - "MYSQL_RANDOM_ROOT_PASSWORD=yes" + networks: + - backend +volumes: + database: + fileadmin: + typo3conf: + uploads: +networks: + backend: diff --git a/README.md b/README.md index 9a1c06b..13afc23 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,8 @@ Available tags This repository offers the following image tags: -- `latest` maps to the latest available LTS version (currently, latest `11.5.*`) +- `latest` maps to the latest available LTS version (currently, latest `12.4.*`) +- `12.4` and `12` for the latest available version from the `12.*` respectively `12.4.*` branch. - `11.5` and `11` for the latest available version from the `11.*` respectively `11.5.*` branch. - `10.4` and `10` for the latest available version from the `10.*` respectively `10.4.*` branch. - `9.5` and `9` for the latest available version from the `9.*` respectively `9.5.*` branch. From f605874947707c175a05c54bbd1bc7a687c2793a Mon Sep 17 00:00:00 2001 From: Martin Helmich Date: Sat, 15 Jul 2023 16:46:58 +0200 Subject: [PATCH 2/2] Change MySQL charset to utf8mb4 in docker-compose file --- 12.4/docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/12.4/docker-compose.yml b/12.4/docker-compose.yml index 4b1ce24..2514cfc 100644 --- a/12.4/docker-compose.yml +++ b/12.4/docker-compose.yml @@ -30,8 +30,8 @@ services: database: image: mysql:8.0 command: - - --character-set-server=utf8 - - --collation-server=utf8_unicode_ci + - --character-set-server=utf8mb4 + - --collation-server=utf8mb4_unicode_ci environment: - "MYSQL_USER=${MYSQL_USER:-typo3}" - "MYSQL_PASSWORD=${MYSQL_PASSWORD:-password}"