This repository provides a TYPO3 demo for EXT:visual_editor. The project is MySQL-only for both local DDEV development and the standalone Docker setup.
- Visual Editor project: https://github.com/andersundsehr/visual_editor
- Standalone image:
ghcr.io/andersundsehr/ddev-demo-setup-visual-editor
Use this workflow if you want to work on the project locally with DDEV.
- Clone the repository
- Run
ddev start - Run
ddev setup - Run
ddev launch /typo3/module/web/edit - If you want to update
EXT:visual_editor, runddev composer u friendsoftypo3/visual-editor - Refresh the committed demo seed artifacts with
ddev update-seed
ddev setup installs Composer dependencies, restores seed/demo.mysql.sql.gz via ddev import-db, syncs seed/fileadmin into public/fileadmin, and runs the TYPO3 post-import tasks.
ddev update-seed updates:
seed/demo.mysql.sql.gzseed/fileadmin
Its database export is produced via ddev export-db.
The standalone setup requires a MySQL service. Use the checked-in docker-compose.yaml to build locally:
docker compose -f docker-compose.yaml up --build -dOr run the published image with your own Compose stack:
services:
mysql:
image: mysql:8.4
environment:
MYSQL_DATABASE: demo
MYSQL_USER: demo
MYSQL_PASSWORD: demo
MYSQL_ROOT_PASSWORD: root
healthcheck:
test: ["CMD-SHELL", "mysqladmin ping -h 127.0.0.1 -uroot -proot --silent"]
interval: 5s
timeout: 3s
retries: 20
volumes:
- mysql-data:/var/lib/mysql
web:
image: ghcr.io/andersundsehr/ddev-demo-setup-visual-editor:latest
depends_on:
mysql:
condition: service_healthy
ports:
- "8080:80"
environment:
DATABASE_URL: mysql://demo:demo@mysql:3306/demo
TYPO3_TRUST_ANY_PROXY: "0"
RESET_DEMO_CRON_SCHEDULE: "0 0 * * *"
volumes:
mysql-data:Start it with:
docker compose up -dOpen the site at:
http://localhost:8080
Follow the startup reset logs:
docker compose logs -f webStop the demo when you are done:
docker compose downDATABASE_URLis required for the standalone container and is parsed into TYPO3'sDB.Connections.Defaultconfig at runtime.- On container startup,
/usr/local/bin/reset-demo-state startuprebuilds the MySQL schema, importsseed/demo.mysql.sql.gz, restoresseed/fileadmin, and clears TYPO3 transient state undervar/cache,var/lock, andpublic/typo3temp. - The scheduled reset timing is controlled by
RESET_DEMO_CRON_SCHEDULEand defaults to0 0 * * *. - Set
RESET_DEMO_DB_WAIT_TIMEOUTif your MySQL service needs longer than 60 seconds to become reachable. - Set
TYPO3_TRUST_ANY_PROXY=1if the demo runs behind a proxy whose forwarded host and HTTPS headers should be trusted by TYPO3.
-
The scheduled reset runs hourly by default.
-
Override the timing by setting
RESET_DEMO_CRON_SCHEDULEto any valid five-field cron expression. -
Set
RESET_DEMO_CRON_SCHEDULE=disabledto turn off scheduled resets. -
MySQL reset drops all tables and views in the configured schema, runs
php vendor/bin/typo3 setup --force --no-interaction ..., and importsseed/demo.mysql.sql.gz. -
Manual execution uses the same restore script:
docker compose exec web /usr/local/bin/reset-demo-state manual-check
GitHub Actions builds the image for pull requests and publishes a multi-architecture image to GHCR on pushes to main.
Published tags:
ghcr.io/andersundsehr/ddev-demo-setup-visual-editor:latestghcr.io/andersundsehr/ddev-demo-setup-visual-editor:sha-<shortsha>
Each published tag resolves to:
linux/amd64linux/arm64
Use these checks if you want to confirm the demo state yourself.
-
Confirm the services are running:
docker compose ps
-
Confirm TYPO3 responds inside the container:
docker compose exec web /bin/bash -lc 'curl -I -sS http://127.0.0.1'
-
Confirm the active database backend is seeded:
docker compose exec web /bin/bash -lc 'php -m | grep -E "pdo_mysql"' docker compose exec web env | grep '^DATABASE_URL=' docker compose exec web /bin/bash -lc 'mysql --protocol=TCP -hmysql -P3306 -udemo -pdemo demo -e "select uid,title from pages order by uid limit 5;"'
-
Confirm seeded files exist:
docker compose exec web /bin/bash -lc 'find /app/public/fileadmin -maxdepth 2 -type f | sort | head -n 10'
-
Validate file reset behavior:
docker compose exec web /bin/bash -lc 'printf "temp\n" > /app/public/fileadmin/user_upload/phase6-temp.txt' docker compose exec web /bin/bash -lc '/usr/local/bin/reset-demo-state manual-check' docker compose exec web /bin/bash -lc 'test ! -e /app/public/fileadmin/user_upload/phase6-temp.txt && echo restored'
-
Validate database reset behavior:
docker compose exec web /bin/bash -lc "mysql --protocol=TCP -hmysql -P3306 -udemo -pdemo demo -e \"update pages set title = 'Manual Check Mutated' where uid = 1; select uid,title from pages where uid = 1;\"" docker compose exec web /bin/bash -lc '/usr/local/bin/reset-demo-state manual-check' docker compose exec web /bin/bash -lc 'mysql --protocol=TCP -hmysql -P3306 -udemo -pdemo demo -e "select uid,title from pages where uid = 1;"'
Expected behavior after these changes:
docker compose -f docker-compose.yaml up --build -dbuilds the image from the local Dockerfile and starts the demo.- Startup reset restores the MySQL-backed demo state and
fileadmin. DATABASE_URL=mysql://demo:demo@mysql:3306/democonfigures TYPO3 without editing PHP config files.- The scheduled reset cadence remains configurable and defaults to hourly.
If something did not work 😮 or you appreciate this Extension 🥰 let us know.
We are always looking for great people to join our team! https://www.andersundsehr.com/karriere/
