Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
53a5d87
feat: initialize typo3 template
thucke Mar 3, 2026
285e2e1
chore: added file
thucke Mar 3, 2026
46a1cb7
feat: added typo3 template
thucke Mar 11, 2026
bd8e3f2
Merge branch 'main' into typo3-frankenphp
thucke Mar 11, 2026
951d8b4
chore: fix tests & remove color template
thucke Mar 11, 2026
d0e4033
chore: force ci in for typo3
thucke Mar 11, 2026
a561844
Merge remote-tracking branch 'origin/main' into typo3-frankenphp
thucke Mar 14, 2026
84ae622
chore: test login to registry before
thucke Mar 14, 2026
cf449d0
chore: added env in workflow
thucke Mar 14, 2026
1c7564d
chore: reactivated GITHUB_TOKEN in workflow
thucke Mar 14, 2026
c89032c
chore: cleanup test additions in action
thucke Mar 14, 2026
4e43d40
chore: fixed tests for typo3
thucke Mar 21, 2026
199badd
chore: fixed tests for typo3
thucke Mar 21, 2026
6918632
fix: adjusted db container timing
thucke Mar 21, 2026
5808b7a
docs: refactor begin
thucke Mar 22, 2026
d9a0459
docs: NOTES.md
thucke Mar 26, 2026
0b854af
docs: NOTES.md
thucke Mar 26, 2026
707e5c8
chore: raised typo3 template version
thucke Mar 26, 2026
bed2917
Merge branch 'main' into typo3-frankenphp
thucke Mar 26, 2026
7e5305b
Merge remote-tracking branch 'origin/main' into typo3-frankenphp
thucke Mar 27, 2026
b631259
fix: conditionals in postCreateCommandscript.sh and others
thucke Mar 27, 2026
690b86f
fix: other conditionals
thucke Mar 27, 2026
a2671aa
fix: setting correct COMPOSE_PROFILES
thucke Mar 27, 2026
eda2b3f
fix: no permission on test cleanup
thucke Mar 27, 2026
f6e43fe
feat: choose database type via template
thucke Mar 28, 2026
fed0779
Merge remote-tracking branch 'origin/main' into typo3-frankenphp
thucke Apr 1, 2026
32effae
chore: finalize for 0.3.0
thucke Apr 1, 2026
e320348
Merge branch 'main' into typo3-frankenphp
thucke Apr 1, 2026
0c5a4a0
Merge remote-tracking branch 'origin/main' into typo3-frankenphp
thucke Apr 1, 2026
d43c5fe
docs: update some doc info
thucke Apr 7, 2026
6e61960
chore: fix scripts
thucke Apr 7, 2026
99f9c7f
chore: add TYPO3.env to .gitignore
thucke Apr 7, 2026
526f7c5
chore: fix parseDotEnv.sh
thucke Apr 7, 2026
221a541
chore: fix TYPO3 initialization
thucke Apr 7, 2026
6ae856d
chore: template 2be validated with introduction extension
thucke Apr 8, 2026
55d8784
Merge branch 'main' into typo3-frankenphp
thucke Apr 8, 2026
787ee6b
chore: hopefully last fixes for test with introduction extension
thucke Apr 8, 2026
95fd21a
Merge branch 'main' into typo3-frankenphp
thucke Apr 8, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/typo3/.devcontainer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,19 +12,19 @@ Homepage: [Github](https://github.com/thucke/devcontainer-templates/tree/main/sr
* Git-Repository: checked out to `${WORKSPACE_ROOT}`

## Re-Initialize TYPO3 environment

If you need to get a clean TYPO3 environment based upon your configuration you may spawn a terminal window and execute

`${WORKSPACE_ROOT}/.devcontainer/docker/igniteEnvironment.sh`

## Update devcontainer template

If you want to update the devcontainer configuration e.g. after a new template version has been published you can make use of the [Dev Container CLI](https://github.com/devcontainers/cli) with the following command:
If you want to update the devcontainer configuration e.g. after a new template version has been published you can make use of the [Dev Container CLI](https://github.com/devcontainers/cli) with the following command (**make sure you're in the root directory of your repository**):

devcontainer templates apply --template-id ghcr.io/thucke/devcontainer-templates/typo3 --template-args "{\"database\": \"mysql\"}" -w ${WORKSPACE_ROOT}.
devcontainer templates apply --template-id ghcr.io/thucke/devcontainer-templates/typo3 --template-args "{\"database\": \"mysql\"}" -w .

## TYPO3 environment configuration

You may modify the file `${WORKSPACE_ROOT}/.devcontainer/.env` with caution if you want to adjust some core TYPO3 settings. After this file has been modified it is recommended to rebuild the whole devcontainer.

**In this file you can find the password of the database root as well as the TYPO3 backend user credentials.**
**In this file you can find the password of the database root as well as the TYPO3 backend user credentials.**
74 changes: 32 additions & 42 deletions src/typo3/.devcontainer/docker/igniteEnvironment.sh
Original file line number Diff line number Diff line change
@@ -1,60 +1,50 @@
#!/bin/bash
set -eu

# post start script
echo "BEGIN: initializeTYPO3.sh"

echo "initializeTYPO3: Checking if site already has been initialized"
if test ! -d .build/vendor; then
echo "initializeTYPO3: Initialize TYPO3"
composer config allow-plugins.helhum/dotenv-connector true
composer require --no-scripts --no-interaction --dev "helhum/dotenv-connector"
composer require --no-scripts --no-interaction --dev "helhum/typo3-console"
composer config bin-dir .build/bin
composer config vendor-dir .build/vendor
composer config extra.typo3/cms.web-dir .build/public
composer config extra.helhum/dotenv-connector.env-file .devcontainer/docker/typo3/TYPO3.env
composer install
# Add .build/bin to PATH
[[ ":$PATH:" != *":${WORKSPACE_ROOT}/.build/bin:"* ]] && export PATH="${WORKSPACE_ROOT}/.build/bin:${PATH}"
fi
#
# !!!! IMPORTANT: WORKSPACE_ROOT has to be set before sourcing this script
echo "BEGIN: igniteEnvironment.sh"

typo3_major_version=$(typo3 -V|grep "TYPO3 CMS"|perl -n -e '/\ ([\d]+)/ && print $1')
echo "initializeTYPO3: Running on TYPO3 major version ${typo3_major_version}"

echo "initializeTYPO3: DB compare"
typo3 database:updateschema --no-interaction --no-ansi || true

echo "initializeTYPO3: Update reference index"
typo3 referenceindex:update --no-interaction --no-ansi || true
echo "igniteEnvironment.sh: Reset environment"
rm -rfv config .build/bin .build/public .build/vendor var
mkdir -vp .build/public var/log/ var/lib
if [ "${DB_SERVER_TYPE}" == "sqlite" ]; then
rm -fv ${SQLITE_DBFILE_PATH}
mkdir -vp $(dirname ${SQLITE_DBFILE_PATH})
else
echo "igniteEnvironment.sh: No need to create SqLite datafile directory"
fi

#echo "initializeTYPO3: Create new backend user"
#$typo3_cli backend:createadmin ${TYPO3_INSTALL_ADMIN_USER} ${TYPO3_INSTALL_ADMIN_PASSWORD} --no-interaction --no-ansi || true

if [ ! -f config/system/additional.php ]; then
echo "initializeTYPO3.sh: Add additional.php if not exists"
cp .devcontainer/docker/typo3/additional.php config/system/additional.php
else
echo "initializeTYPO3.sh: additional.php already exists - skipping"
mysql -h${TYPO3_INSTALL_DB_HOST} -P${TYPO3_INSTALL_DB_PORT} -u${TYPO3_INSTALL_DB_USER} -p${TYPO3_INSTALL_DB_PASSWORD} --init-command='USE '${TYPO3_INSTALL_DB_DBNAME} < .devcontainer/docker/db/initdb/2_create_procedure.sql
elif [ "${TYPO3_INSTALL_DB_DRIVER}" == "pdo_sqlite" ] && [ -f ${SQLITE_DBFILE_PATH} ]; then
echo "Using SQLite as database - resetting database"
rm -fv ${SQLITE_DBFILE_PATH}
fi

# take care of file ownership esp. to support cross container functionality
echo "initializeTYPO3: Update file and directory ownership"
chown -R ${DEVCONTAINER_SERVICE_NAME}:${DEVCONTAINER_SERVICE_NAME} config .build var
chgrp ${DEVCONTAINER_SERVICE_NAME} ${WORKSPACE_ROOT}

# needed as directory check moans about wrong permissions
echo "initializeTYPO3: Update file permissions"
chmod -R 2770 .build config var

echo "initializeTYPO3.sh: Running composer up"
composer up

if [ "${TYPO3_INSTALL_DB_DRIVER}" == "mysqli" ]; then
echo "initializeTYPO3.sh: Fix TYPO3 image references"
mysql -h127.0.0.1 -P3306 -u${TYPO3_INSTALL_DB_USER} -p${TYPO3_INSTALL_DB_PASSWORD} -e 'use '${TYPO3_INSTALL_DB_DBNAME}'; call fixImgInTtContent();'
if [ -f ${WORKSPACE_ROOT}/composer.json ]; then
echo "initializeTYPO3.sh: Found composer.json - running initializeTYPO3.sh"
chmod +x .devcontainer/docker/initializeTYPO3.sh
.devcontainer/docker/initializeTYPO3.sh
else
echo "initializeTYPO3.sh: Fix TYPO3 image references - skipping as database driver is not mysqli"
echo "No composer.json found - skipping initializeTYPO3.sh and composer up"
fi

if [[ "${COMPOSE_PROFILES}" =~ "php-fpm" ]]; then
echo "initializeTYPO3.sh: Checking for running php-fpm"
.devcontainer/php-fpm/server.sh restart
elif [[ "${COMPOSE_PROFILES}" =~ "apache" ]]; then
echo "initializeTYPO3.sh: Restarting Apache"
.devcontainer/php-fpm/server.sh
elif [[ "${COMPOSE_PROFILES}" =~ "frankenphp" ]]; then
echo "initializeTYPO3.sh: Restarting FrankenPHP"
.devcontainer/docker/frankenphp/server.sh restart
fi

echo "END: initializeTYPO3.sh"
2 changes: 1 addition & 1 deletion src/typo3/devcontainer-template.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"id": "typo3",
"version": "0.3.2",
"version": "0.3.3",
"name": "Typo3",
"description": "A template to support remote development with TYPO3.",
"documentationURL": "https://github.com/thucke/devcontainer-templates/tree/main/src/typo3",
Expand Down
Loading