├── .ddev ├── config.yaml └── docker-compose.context.yaml ├── .devcontainer ├── ddev-install.sh └── devcontainer.json ├── .dockerignore ├── .editorconfig ├── .env.gitpod ├── .github └── workflows │ └── docker-publish.yml ├── .gitignore ├── .gitpod.yml ├── .vscode └── settings.json ├── Build └── DownloadSitePackage │ ├── data.json │ └── generate_sitepackage.sh ├── DEVELOPMENT.md ├── Dockerfile ├── Makefile ├── README.md ├── composer.json ├── composer.lock ├── config ├── sites │ ├── main │ │ ├── config.yaml │ │ └── page.tsconfig │ └── main2 │ │ └── page.tsconfig └── system │ ├── additional.php │ ├── additional_ddev.php │ └── settings.php ├── docker-compose.yml ├── entrypoint.sh ├── gitpod-setup.sh └── packages └── .gitkeep /.ddev/config.yaml: -------------------------------------------------------------------------------- 1 | name: typo3-screenshots-standalone 2 | type: typo3 3 | docroot: public 4 | php_version: "8.3" 5 | webserver_type: nginx-fpm 6 | xdebug_enabled: false 7 | additional_hostnames: [] 8 | additional_fqdns: [] 9 | database: 10 | type: mariadb 11 | version: "10.11" 12 | use_dns_when_possible: true 13 | composer_version: "2" 14 | web_environment: [] 15 | hooks: 16 | post-import-db: 17 | - exec: ./vendor/bin/typo3 database:updateschema 18 | post-start: 19 | - exec: mkdir -p var/transient 20 | - exec: echo "KEEP_FILE" > var/transient/ENABLE_INSTALL_TOOL 21 | 22 | # Key features of DDEV's config.yaml: 23 | 24 | # name: # Name of the project, automatically provides 25 | # http://projectname.ddev.site and https://projectname.ddev.site 26 | 27 | # type: # backdrop, craftcms, django4, drupal6/7/8/9/10, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress 28 | # See https://ddev.readthedocs.io/en/latest/users/quickstart/ for more 29 | # information on the different project types 30 | 31 | # docroot: # Relative path to the directory containing index.php. 32 | 33 | # php_version: "8.1" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3" 34 | 35 | # You can explicitly specify the webimage but this 36 | # is not recommended, as the images are often closely tied to DDEV's' behavior, 37 | # so this can break upgrades. 38 | 39 | # webimage: # nginx/php docker image. 40 | 41 | # database: 42 | # type: # mysql, mariadb, postgres 43 | # version: # database version, like "10.4" or "8.0" 44 | # MariaDB versions can be 5.5-10.8 and 10.11, MySQL versions can be 5.5-8.0 45 | # PostgreSQL versions can be 9-16. 46 | 47 | # router_http_port: # Port to be used for http (defaults to global configuration, usually 80) 48 | # router_https_port: # Port for https (defaults to global configuration, usually 443) 49 | 50 | # xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart" 51 | # Note that for most people the commands 52 | # "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better, 53 | # as leaving Xdebug enabled all the time is a big performance hit. 54 | 55 | # xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart" 56 | # Note that for most people the commands 57 | # "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better, 58 | # as leaving Xhprof enabled all the time is a big performance hit. 59 | 60 | # webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn 61 | 62 | # timezone: Europe/Berlin 63 | # This is the timezone used in the containers and by PHP; 64 | # it can be set to any valid timezone, 65 | # see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones 66 | # For example Europe/Dublin or MST7MDT 67 | 68 | # composer_root: 69 | # Relative path to the Composer root directory from the project root. This is 70 | # the directory which contains the composer.json and where all Composer related 71 | # commands are executed. 72 | 73 | # composer_version: "2" 74 | # You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1 75 | # to use the latest major version available at the time your container is built. 76 | # It is also possible to use each other Composer version channel. This includes: 77 | # - 2.2 (latest Composer LTS version) 78 | # - stable 79 | # - preview 80 | # - snapshot 81 | # Alternatively, an explicit Composer version may be specified, for example "2.2.18". 82 | # To reinstall Composer after the image was built, run "ddev debug refresh". 83 | 84 | # nodejs_version: "18" 85 | # change from the default system Node.js version to any other version. 86 | # Numeric version numbers can be complete (i.e. 18.15.0) or 87 | # incomplete (18, 17.2, 16). 'lts' and 'latest' can be used as well along with 88 | # other named releases. 89 | # see https://www.npmjs.com/package/n#specifying-nodejs-versions 90 | # Note that you can continue using 'ddev nvm' or nvm inside the web container 91 | # to change the project's installed node version if you need to. 92 | 93 | # additional_hostnames: 94 | # - somename 95 | # - someothername 96 | # would provide http and https URLs for "somename.ddev.site" 97 | # and "someothername.ddev.site". 98 | 99 | # additional_fqdns: 100 | # - example.com 101 | # - sub1.example.com 102 | # would provide http and https URLs for "example.com" and "sub1.example.com" 103 | # Please take care with this because it can cause great confusion. 104 | 105 | # upload_dirs: "custom/upload/dir" 106 | # 107 | # upload_dirs: 108 | # - custom/upload/dir 109 | # - ../private 110 | # 111 | # would set the destination paths for ddev import-files to /custom/upload/dir 112 | # When Mutagen is enabled this path is bind-mounted so that all the files 113 | # in the upload_dirs don't have to be synced into Mutagen. 114 | 115 | # disable_upload_dirs_warning: false 116 | # If true, turns off the normal warning that says 117 | # "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set" 118 | 119 | # ddev_version_constraint: "" 120 | # Example: 121 | # ddev_version_constraint: ">= 1.22.4" 122 | # This will enforce that the running ddev version is within this constraint. 123 | # See https://github.com/Masterminds/semver#checking-version-constraints for 124 | # supported constraint formats 125 | 126 | # working_dir: 127 | # web: /var/www/html 128 | # db: /home 129 | # would set the default working directory for the web and db services. 130 | # These values specify the destination directory for ddev ssh and the 131 | # directory in which commands passed into ddev exec are run. 132 | 133 | # omit_containers: [db, ddev-ssh-agent] 134 | # Currently only these containers are supported. Some containers can also be 135 | # omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit 136 | # the "db" container, several standard features of DDEV that access the 137 | # database container will be unusable. In the global configuration it is also 138 | # possible to omit ddev-router, but not here. 139 | 140 | # performance_mode: "global" 141 | # DDEV offers performance optimization strategies to improve the filesystem 142 | # performance depending on your host system. Should be configured globally. 143 | # 144 | # If set, will override the global config. Possible values are: 145 | # - "global": uses the value from the global config. 146 | # - "none": disables performance optimization for this project. 147 | # - "mutagen": enables Mutagen for this project. 148 | # - "nfs": enables NFS for this project. 149 | # 150 | # See https://ddev.readthedocs.io/en/latest/users/install/performance/#nfs 151 | # See https://ddev.readthedocs.io/en/latest/users/install/performance/#mutagen 152 | 153 | # fail_on_hook_fail: False 154 | # Decide whether 'ddev start' should be interrupted by a failing hook 155 | 156 | # host_https_port: "59002" 157 | # The host port binding for https can be explicitly specified. It is 158 | # dynamic unless otherwise specified. 159 | # This is not used by most people, most people use the *router* instead 160 | # of the localhost port. 161 | 162 | # host_webserver_port: "59001" 163 | # The host port binding for the ddev-webserver can be explicitly specified. It is 164 | # dynamic unless otherwise specified. 165 | # This is not used by most people, most people use the *router* instead 166 | # of the localhost port. 167 | 168 | # host_db_port: "59002" 169 | # The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic 170 | # unless explicitly specified. 171 | 172 | # mailpit_http_port: "8025" 173 | # mailpit_https_port: "8026" 174 | # The Mailpit ports can be changed from the default 8025 and 8026 175 | 176 | # host_mailpit_port: "8025" 177 | # The mailpit port is not normally bound on the host at all, instead being routed 178 | # through ddev-router, but it can be bound directly to localhost if specified here. 179 | 180 | # webimage_extra_packages: [php7.4-tidy, php-bcmath] 181 | # Extra Debian packages that are needed in the webimage can be added here 182 | 183 | # dbimage_extra_packages: [telnet,netcat] 184 | # Extra Debian packages that are needed in the dbimage can be added here 185 | 186 | # use_dns_when_possible: true 187 | # If the host has internet access and the domain configured can 188 | # successfully be looked up, DNS will be used for hostname resolution 189 | # instead of editing /etc/hosts 190 | # Defaults to true 191 | 192 | # project_tld: ddev.site 193 | # The top-level domain used for project URLs 194 | # The default "ddev.site" allows DNS lookup via a wildcard 195 | # If you prefer you can change this to "ddev.local" to preserve 196 | # pre-v1.9 behavior. 197 | 198 | # ngrok_args: --basic-auth username:pass1234 199 | # Provide extra flags to the "ngrok http" command, see 200 | # https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h" 201 | 202 | # disable_settings_management: false 203 | # If true, DDEV will not create CMS-specific settings files like 204 | # Drupal's settings.php/settings.ddev.php or TYPO3's AdditionalConfiguration.php 205 | # In this case the user must provide all such settings. 206 | 207 | # You can inject environment variables into the web container with: 208 | # web_environment: 209 | # - SOMEENV=somevalue 210 | # - SOMEOTHERENV=someothervalue 211 | 212 | # no_project_mount: false 213 | # (Experimental) If true, DDEV will not mount the project into the web container; 214 | # the user is responsible for mounting it manually or via a script. 215 | # This is to enable experimentation with alternate file mounting strategies. 216 | # For advanced users only! 217 | 218 | # bind_all_interfaces: false 219 | # If true, host ports will be bound on all network interfaces, 220 | # not the localhost interface only. This means that ports 221 | # will be available on the local network if the host firewall 222 | # allows it. 223 | 224 | # default_container_timeout: 120 225 | # The default time that DDEV waits for all containers to become ready can be increased from 226 | # the default 120. This helps in importing huge databases, for example. 227 | 228 | #web_extra_exposed_ports: 229 | #- name: nodejs 230 | # container_port: 3000 231 | # http_port: 2999 232 | # https_port: 3000 233 | #- name: something 234 | # container_port: 4000 235 | # https_port: 4000 236 | # http_port: 3999 237 | # Allows a set of extra ports to be exposed via ddev-router 238 | # Fill in all three fields even if you don’t intend to use the https_port! 239 | # If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start. 240 | # 241 | # The port behavior on the ddev-webserver must be arranged separately, for example 242 | # using web_extra_daemons. 243 | # For example, with a web app on port 3000 inside the container, this config would 244 | # expose that web app on https://.ddev.site:9999 and http://.ddev.site:9998 245 | # web_extra_exposed_ports: 246 | # - name: myapp 247 | # container_port: 3000 248 | # http_port: 9998 249 | # https_port: 9999 250 | 251 | #web_extra_daemons: 252 | #- name: "http-1" 253 | # command: "/var/www/html/node_modules/.bin/http-server -p 3000" 254 | # directory: /var/www/html 255 | #- name: "http-2" 256 | # command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000" 257 | # directory: /var/www/html 258 | 259 | # override_config: false 260 | # By default, config.*.yaml files are *merged* into the configuration 261 | # But this means that some things can't be overridden 262 | # For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge 263 | # and you can't erase existing hooks or all environment variables. 264 | # However, with "override_config: true" in a particular config.*.yaml file, 265 | # 'use_dns_when_possible: false' can override the existing values, and 266 | # hooks: 267 | # post-start: [] 268 | # or 269 | # web_environment: [] 270 | # or 271 | # additional_hostnames: [] 272 | # can have their intended affect. 'override_config' affects only behavior of the 273 | # config.*.yaml file it exists in. 274 | 275 | # Many DDEV commands can be extended to run tasks before or after the 276 | # DDEV command is executed, for example "post-start", "post-import-db", 277 | # "pre-composer", "post-composer" 278 | # See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more 279 | # information on the commands that can be extended and the tasks you can define 280 | # for them. Example: 281 | #hooks: 282 | # post-start: 283 | # - exec: composer install -d /var/www/html 284 | -------------------------------------------------------------------------------- /.ddev/docker-compose.context.yaml: -------------------------------------------------------------------------------- 1 | services: 2 | web: 3 | environment: 4 | - TYPO3_CONTEXT=Development/Local 5 | - TYPO3_DB_DRIVER=mysqli 6 | - TYPO3_DB_USERNAME=db 7 | - TYPO3_DB_PORT=3306 8 | - TYPO3_DB_HOST=db 9 | - TYPO3_DB_DBNAME=db 10 | - TYPO3_SETUP_ADMIN_EMAIL=j.doe@example.org 11 | - TYPO3_SETUP_ADMIN_USERNAME=j.doe 12 | - TYPO3_SETUP_ADMIN_PASSWORD=Password.1 13 | - TYPO3_PROJECT_NAME="TYPO3 Documentation Team Screenshots" 14 | - TYPO3_SERVER_TYPE=other 15 | -------------------------------------------------------------------------------- /.devcontainer/ddev-install.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/bash 2 | 3 | # Add DDEV’s GPG key to your keyring 4 | sudo sh -c 'echo ""' 5 | sudo apt-get update && sudo apt-get install -y curl 6 | sudo install -m 0755 -d /etc/apt/keyrings 7 | curl -fsSL https://pkg.ddev.com/apt/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/ddev.gpg > /dev/null 8 | sudo chmod a+r /etc/apt/keyrings/ddev.gpg 9 | 10 | # Add DDEV releases to your package repository 11 | sudo sh -c 'echo ""' 12 | echo "deb [signed-by=/etc/apt/keyrings/ddev.gpg] https://pkg.ddev.com/apt/ * *" | sudo tee /etc/apt/sources.list.d/ddev.list >/dev/null 13 | 14 | # Update package information and install DDEV 15 | sudo sh -c 'echo ""' 16 | sudo apt-get update && sudo apt-get install -y ddev 17 | 18 | # One-time initialization of mkcert 19 | mkcert -install 20 | 21 | 22 | # ### Custom 23 | # Ensure required folders exist 24 | mkdir -p /home/vscode/.ddev/commands/host 25 | echo " 26 | disable_http2: false 27 | fail_on_hook_fail: false 28 | instrumentation_opt_in: false 29 | internet_detection_timeout_ms: 3000 30 | last_started_version: ${LAST_STARTED_VERSION} 31 | letsencrypt_email: "" 32 | mkcert_caroot: /home/vscode/.local/share/mkcert 33 | no_bind_mounts: false 34 | omit_containers: [] 35 | performance_mode: none 36 | project_tld: ddev.site 37 | router: traefik 38 | router_bind_all_interfaces: false 39 | router_http_port: \"80\" 40 | router_https_port: \"443\" 41 | mailpit_http_port: \"8025\" 42 | mailpit_https_port: \"8026\" 43 | simple_formatting: false 44 | table_style: default 45 | traefik_monitor_port: \"10999\" 46 | use_hardened_images: false 47 | use_letsencrypt: false 48 | wsl2_no_windows_hosts_mgt: false 49 | web_environment: [] 50 | xdebug_ide_location: "" 51 | " > /home/vscode/.ddev/global_config.yaml 52 | -------------------------------------------------------------------------------- /.devcontainer/devcontainer.json: -------------------------------------------------------------------------------- 1 | // For format details, see https://aka.ms/devcontainer.json. For config options, see the 2 | // README at: https://github.com/devcontainers/templates/tree/main/src/docker-in-docker 3 | { 4 | "name": "Docker in Docker", 5 | "image": "mcr.microsoft.com/devcontainers/base:bullseye", 6 | "customizations": { 7 | "vscode": { 8 | "extensions": ["ms-azuretools.vscode-docker"] 9 | } 10 | }, 11 | "containerEnv": { 12 | // Ignore new version prompt: https://github.com/ddev/ddev/issues/1882 13 | "DDEV_NO_INSTRUMENTATION": "true" 14 | }, 15 | "features": { 16 | "ghcr.io/devcontainers/features/docker-in-docker:2": { 17 | "version": "latest", 18 | "enableNonRootDocker": "true", 19 | "moby": "true" 20 | } 21 | }, 22 | 23 | // Use 'forwardPorts' to make a list of ports inside the container available locally. 24 | // "forwardPorts": [], 25 | 26 | // Use 'postCreateCommand' to run commands after the container is created. 27 | "postCreateCommand": "bash .devcontainer/ddev-install.sh && mkcert -install && ddev start -y && make delete-db && make install" 28 | } 29 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | config/system/settings.php 2 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # EditorConfig is awesome: http://EditorConfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Unix-style newlines with a newline ending every file 7 | [*] 8 | charset = utf-8 9 | end_of_line = lf 10 | insert_final_newline = true 11 | trim_trailing_whitespace = true 12 | 13 | # CSS-Files 14 | [*.css] 15 | indent_style = space 16 | indent_size = 4 17 | 18 | # HTML-Files 19 | [*.html] 20 | indent_style = space 21 | indent_size = 4 22 | 23 | # TMPL-Files 24 | [*.tmpl] 25 | indent_style = space 26 | indent_size = 4 27 | 28 | # JS-Files 29 | [*.js] 30 | indent_style = space 31 | indent_size = 4 32 | 33 | # PHP-Files 34 | [*.php] 35 | indent_style = space 36 | indent_size = 4 37 | 38 | # MD-Files 39 | [*.md] 40 | indent_style = space 41 | indent_size = 4 42 | 43 | # ReST-Files 44 | [*.rst] 45 | indent_style = space 46 | indent_size = 3 47 | 48 | # TypoScript 49 | [*.typoscript] 50 | indent_style = space 51 | indent_size = 4 52 | 53 | # YML-Files 54 | [{*.yml,*.yaml}] 55 | indent_style = space 56 | indent_size = 2 57 | 58 | # package.json 59 | [package.json] 60 | indent_style = space 61 | indent_size = 2 62 | 63 | # composer.json 64 | [composer.json] 65 | indent_style = space 66 | indent_size = 4 67 | 68 | # phpstan 69 | [*.neon] 70 | indent_style = tab 71 | 72 | [Makefile] 73 | # Use tabs for indentation (Makefiles require tabs) 74 | indent_style = tab 75 | 76 | -------------------------------------------------------------------------------- /.env.gitpod: -------------------------------------------------------------------------------- 1 | TYPO3_CONTEXT=Development 2 | 3 | # Use SQLite as the DB driver 4 | TYPO3_DB_DRIVER=sqlite 5 | 6 | # SQLite uses a file path instead of host/username/password/dbname 7 | TYPO3_DB_PATH=var/sqlite.db 8 | 9 | # Optional: Metadata for auto-setup 10 | TYPO3_SETUP_ADMIN_EMAIL=j.doe@example.org 11 | TYPO3_SETUP_ADMIN_USERNAME=j.doe 12 | TYPO3_SETUP_ADMIN_PASSWORD=UnsaFe123! 13 | 14 | TYPO3_PROJECT_NAME="Automated Setup" 15 | TYPO3_SERVER_TYPE=other 16 | -------------------------------------------------------------------------------- /.github/workflows/docker-publish.yml: -------------------------------------------------------------------------------- 1 | name: Build and Push Docker Image 2 | 3 | on: 4 | push: 5 | branches: 6 | - main 7 | 8 | jobs: 9 | build-and-push: 10 | runs-on: ubuntu-latest 11 | 12 | permissions: 13 | contents: read 14 | packages: write 15 | 16 | steps: 17 | - name: Checkout code 18 | uses: actions/checkout@v3 19 | 20 | - name: Set up Docker Buildx 21 | uses: docker/setup-buildx-action@v3 22 | 23 | - name: Log in to Docker Hub 24 | uses: docker/login-action@v3 25 | with: 26 | username: ${{ secrets.DOCKERHUB_USERNAME }} 27 | password: ${{ secrets.DOCKERHUB_TOKEN }} 28 | 29 | - name: Build and push Docker image 30 | uses: docker/build-push-action@v5 31 | with: 32 | context: . 33 | push: true 34 | tags: linawolf/typo3-screenshots:latest 35 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | /.env 3 | /vendor 4 | /var/ 5 | /public 6 | /packages/my_site_package/ 7 | -------------------------------------------------------------------------------- /.gitpod.yml: -------------------------------------------------------------------------------- 1 | tasks: 2 | - name: Setup TYPO3 3 | init: | 4 | cp .env.gitpod .env || true 5 | cp config/system/additional-gitpod.php config/system/additional.php || true 6 | chmod +x gitpod-setup.sh 7 | ./gitpod-setup.sh 8 | command: | 9 | pkill -f "php -S" || true 10 | php -S 0.0.0.0:8000 -t public > /tmp/typo3-server.log 2>&1 & 11 | 12 | ports: 13 | - port: 8000 14 | onOpen: open-preview 15 | -------------------------------------------------------------------------------- /.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "workbench.startupEditor": "none", 3 | "workbench.tree.indent": 20, 4 | "explorer.compactFolders": false, 5 | "workbench.editorAssociations": { 6 | "*.md": "vscode.markdown.preview.editor" 7 | } 8 | } -------------------------------------------------------------------------------- /Build/DownloadSitePackage/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "base_package": "site_package_tutorial", 3 | "typo3_version": 13.4, 4 | "title": "My Site Package", 5 | "description": "Site package to follow the tutorial. ", 6 | "repository_url": "https://github.com/TYPO3-Documentation/TYPO3CMS-Tutorial-SitePackage", 7 | "author": { 8 | "name": "J. Doe", 9 | "email": "j.doe@example.org", 10 | "company": "My Vendor", 11 | "homepage": "https://docs.typo3.org/permalink/t3sitepackage:start" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /Build/DownloadSitePackage/generate_sitepackage.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | curl -X 'POST' \ 4 | 'https://get.typo3.org/api/v1/sitepackage/' \ 5 | -H 'accept: application/zip' \ 6 | -H 'Content-Type: application/json' \ 7 | -d @"$(dirname "$0")/data.json" --output packages/my_site_package.zip 8 | 9 | rm -rf packages/my_site_package/* 10 | rm -rf packages/my_site_package/.* 11 | unzip packages/my_site_package.zip -d "packages/my_site_package/" 12 | rm packages/my_site_package.zip 13 | -------------------------------------------------------------------------------- /DEVELOPMENT.md: -------------------------------------------------------------------------------- 1 | # Development Guide 2 | 3 | This document contains information for contributors and developers working on the TYPO3 Screenshot Project. 4 | 5 | ## Overview 6 | 7 | This project is used to generate a preconfigured TYPO3 installation for taking consistent screenshots. The container 8 | is stateless and resets itself on each run using an embedded SQLite database. You can either build it locally with 9 | Docker, or use DDEV and Codespaces for development. 10 | 11 | --- 12 | 13 | ## 🚧 Local Development with Docker 14 | 15 | You can build and run the project manually during development using Docker. This setup includes a SQLite database that is reset on each run. 16 | 17 | ### Build the container 18 | 19 | ```bash 20 | docker build -t typo3-screenshots-standalone . 21 | ``` 22 | 23 | ### Run the container 24 | 25 | ```bash 26 | docker run -d --name typo3-screenshots-standalone -p 8080:80 typo3-screenshots-standalone 27 | ``` 28 | 29 | ### View logs 30 | 31 | ```bash 32 | docker logs -f typo3-screenshots-standalone 33 | ``` 34 | 35 | ### Access the container shell 36 | 37 | ```bash 38 | docker exec -it typo3-screenshots-standalone bash 39 | ``` 40 | 41 | ### Run interactively (for debugging) 42 | 43 | ```bash 44 | docker run --rm -it -p 8080:80 typo3-screenshots-standalone 45 | ``` 46 | 47 | --- 48 | 49 | ## 💻 Using GitHub Codespaces 50 | 51 | You can also develop directly in [GitHub Codespaces](https://github.com/features/codespaces): 52 | 53 | 1. Click **"Code"** on the [repository page](https://github.com/TYPO3-Documentation/site-introduction) and choose **"Create Codespace on main"**. 54 | 2. Wait for the Codespace to initialize. 55 | 3. Once ready, open the TYPO3 backend in your browser (a popup will appear). 56 | 4. Log in using: 57 | 58 | - **Username:** `j.doe` 59 | - **Password:** `Password.1` 60 | 61 | To restart the environment after resuming a Codespace: 62 | 63 | ```bash 64 | ddev start 65 | ``` 66 | 67 | --- 68 | 69 | ## 🐳 Local Installation with DDEV 70 | 71 | ### Prerequisites 72 | 73 | - [Docker](https://docs.docker.com/get-docker/) 74 | - [DDEV](https://ddev.readthedocs.io/) 75 | - Internet connection for downloading packages and dependencies 76 | 77 | ### Start the project 78 | 79 | ```bash 80 | ddev start 81 | make install 82 | ``` 83 | 84 | Log into the backend: 85 | 86 | ``` 87 | https://site-introduction.ddev.site/typo3 88 | ``` 89 | 90 | **Credentials:** 91 | 92 | - **Username:** `j.doe` 93 | - **Password:** You choose this during install 94 | 95 | > ⚠️ You may need to switch the backend layout of the root page to "default" manually. This will be fixed in the site package builder. 96 | 97 | --- 98 | 99 | ## 🔄 Updating the project 100 | 101 | If you want to refresh the database and regenerate assets: 102 | 103 | ```bash 104 | make delete 105 | make update 106 | ``` 107 | 108 | This will delete the database, regenerate the site package, and update Composer dependencies. 109 | 110 | --- 111 | 112 | ## 👥 Create example editors 113 | 114 | Run the following commands to create demo backend users: 115 | 116 | ```bash 117 | make create-editors 118 | make update-page-permissions 119 | ``` 120 | 121 | --- 122 | 123 | ## 🧹 Clean up the project 124 | 125 | To remove everything: 126 | 127 | ```bash 128 | make delete 129 | ``` 130 | 131 | --- 132 | 133 | ## 📦 Publishing your Docker Image 134 | 135 | To tag and push your own image to Docker Hub: 136 | 137 | ```bash 138 | docker build -t yourname/typo3-screenshots . 139 | docker push yourname/typo3-screenshots 140 | ``` 141 | 142 | Then others can run: 143 | 144 | ```bash 145 | docker run -d -p 8080:80 yourname/typo3-screenshots 146 | ``` 147 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM php:8.4-apache-bookworm 2 | 3 | # Install system dependencies and PHP extensions 4 | RUN apt-get update && apt-get upgrade -y && \ 5 | apt-get install -y --no-install-recommends \ 6 | git unzip curl \ 7 | libxml2-dev libfreetype6-dev \ 8 | libjpeg62-turbo-dev libmcrypt-dev \ 9 | libpng-dev libpq-dev libzip-dev zlib1g-dev \ 10 | graphicsmagick \ 11 | && docker-php-ext-configure gd --with-libdir=/usr/include/ --with-jpeg --with-freetype \ 12 | && docker-php-ext-install -j$(nproc) mysqli soap gd zip opcache intl pgsql pdo_pgsql exif \ 13 | && a2enmod rewrite \ 14 | && apt-get clean \ 15 | && rm -rf /var/lib/apt/lists/* 16 | 17 | # PHP runtime configuration for TYPO3 18 | RUN echo "max_execution_time = 240\n\ 19 | max_input_vars = 1500\n\ 20 | upload_max_filesize = 32M\n\ 21 | post_max_size = 32M" > /usr/local/etc/php/conf.d/typo3.ini 22 | 23 | # Install Composer 24 | RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer 25 | 26 | # Set working directory 27 | WORKDIR /var/www/html 28 | 29 | # Copy only the necessary folders and files 30 | COPY composer.json composer.lock ./ 31 | COPY Build/ Build/ 32 | COPY config/ config/ 33 | COPY packages/ packages/ 34 | # Copy the entrypoint script into the container 35 | COPY entrypoint.sh /entrypoint.sh 36 | 37 | # Update Apache DocumentRoot to /var/www/html/public 38 | RUN sed -i 's|DocumentRoot /var/www/html|DocumentRoot /var/www/html/public|g' /etc/apache2/sites-available/000-default.conf && \ 39 | echo '\n\ 40 | AllowOverride All\n\ 41 | Require all granted\n\ 42 | ' >> /etc/apache2/apache2.conf 43 | 44 | # Ensure correct permissions 45 | RUN chown -R www-data:www-data /var/www/html 46 | 47 | # Make the script executable 48 | RUN chmod +x /entrypoint.sh 49 | 50 | # Set it as the container's entrypoint 51 | ENTRYPOINT ["/entrypoint.sh"] 52 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: help 2 | help: ## Displays this list of targets with descriptions 3 | @echo "!!!Do not use these commands in real world projects!!! The following commands are available:\n" 4 | @grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' 5 | 6 | .PHONY: update-sitepackage 7 | update-sitepackage: ## Update the site package 8 | ddev exec ./Build/DownloadSitePackage/generate_sitepackage.sh 9 | 10 | .PHONY: update-composer 11 | update-composer: ## Update the site package 12 | ddev composer install 13 | 14 | .PHONY: setup 15 | setup: 16 | ddev typo3 setup --force --create-site '' --password 'db' 17 | ddev typo3 extension:setup 18 | 19 | .PHONY: create-editors 20 | create-editors: 21 | ddev typo3 setup:begroups:default -g Both 22 | ddev typo3 backend:user:create --username=e.doe --password=UnsaFe123! --groups=1 --email=e.doe@example.org --no-interaction 23 | ddev typo3 backend:user:create --username=a.doe --password=UnsaFe123! --groups="1,2" --email=a.doe@example.org --no-interaction 24 | @echo "User e.doe demonstrates standard editor permissions, a.doe advanced editor permissions" 25 | 26 | .PHONY: update-page-permissions 27 | update-page-permissions: 28 | ddev exec -s db 'mysql --database=mysql -e "UPDATE db.pages set perms_groupid=1"' 29 | 30 | .PHONY: update 31 | update: update-sitepackage update-composer update-page-permissions ## Update everything 32 | 33 | .PHONY: install 34 | install: update-sitepackage update-composer restart setup create-editors update-page-permissions ## Install everything 35 | 36 | .PHONY: restart 37 | restart: ## Restart DDEV 38 | @echo "Restarting DDEV to ensure it can detect TYPO3 version and create additional.php" 39 | ddev restart 40 | 41 | .PHONY: delete 42 | delete: ## Delete DDEV and Database 43 | ddev delete --omit-snapshot 44 | rm -rf vendor 45 | rm -rf var 46 | rm -rf public 47 | 48 | .PHONY: delete-db 49 | delete-db: ## Delete DDEV and Database 50 | ddev exec -s db 'mysql --database=mysql -e "DROP DATABASE db; CREATE DATABASE db;"' 51 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Ready to use Project for Screenshots 2 | 3 | This project is intended to create consistent screenshots for the official TYPO3 Documentation. 4 | For visual style guidance, refer to the 5 | [Guidelines for creating images](https://docs.typo3.org/permalink/h2document:guidelines-for-images) 6 | 7 | > [!WARNING] 8 | > This is not suitable for production use. It is a demo installation meant for local or temporary usage only. 9 | 10 | --- 11 | 12 | ## 🚀 Quick Start Using Docker 13 | 14 | You can run the screenshot project locally using the prebuilt Docker image: 15 | 16 | ```bash 17 | docker run -d --name typo3-screenshots -p 8080:80 linawolf/typo3-screenshots 18 | ``` 19 | 20 | Follow the logs to track progress: 21 | 22 | ```bash 23 | docker logs -f typo3-screenshots 24 | ``` 25 | 26 | Once setup is complete, open: 27 | 28 | ``` 29 | http://localhost:8080/typo3 30 | ``` 31 | 32 | **Login credentials:** 33 | 34 | - **Username:** `j.doe` 35 | - **Password:** `Password.1` 36 | 37 | > [!NOTE] 38 | > The container resets on every run. It’s ideal for reproducible test environments and fresh screenshots. 39 | 40 | --- 41 | 42 | ## 🔧 Development 43 | 44 | If you want to build the container yourself, run it interactively, or work with DDEV or GitHub Codespaces, see: 45 | 46 | 👉 [DEVELOPMENT.md](./DEVELOPMENT.md) 47 | 48 | --- 49 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "typo3/cms-base-distribution", 3 | "description" : "TYPO3 CMS Base Distribution", 4 | "license": "GPL-2.0-or-later", 5 | "type": "project", 6 | "config": { 7 | "allow-plugins": { 8 | "typo3/class-alias-loader": true, 9 | "typo3/cms-composer-installers": true 10 | }, 11 | "platform": { 12 | "php": "8.2.0" 13 | }, 14 | "sort-packages": true 15 | }, 16 | "repositories": [ 17 | { 18 | "type": "path", 19 | "url": "packages/*" 20 | } 21 | ], 22 | "require": { 23 | "friendsoftypo3/content-blocks": "^1.0", 24 | "my-vendor/my-site-package": "@dev", 25 | "typo3/cms-backend": "^13.4", 26 | "typo3/cms-belog": "^13.4", 27 | "typo3/cms-beuser": "^13.4", 28 | "typo3/cms-core": "^13.4", 29 | "typo3/cms-dashboard": "^13.4", 30 | "typo3/cms-extbase": "^13.4", 31 | "typo3/cms-extensionmanager": "^13.4", 32 | "typo3/cms-felogin": "^13.4", 33 | "typo3/cms-filelist": "^13.4", 34 | "typo3/cms-fluid": "^13.4", 35 | "typo3/cms-fluid-styled-content": "^13.4", 36 | "typo3/cms-form": "^13.4", 37 | "typo3/cms-frontend": "^13.4", 38 | "typo3/cms-impexp": "^13.4", 39 | "typo3/cms-info": "^13.4", 40 | "typo3/cms-install": "^13.4", 41 | "typo3/cms-reactions": "^13.4", 42 | "typo3/cms-rte-ckeditor": "^13.4", 43 | "typo3/cms-seo": "^13.4", 44 | "typo3/cms-setup": "^13.4", 45 | "typo3/cms-sys-note": "^13.4", 46 | "typo3/cms-t3editor": "^13.4", 47 | "typo3/cms-tstemplate": "^13.4", 48 | "typo3/cms-viewpage": "^13.4", 49 | "typo3/cms-webhooks": "^13.4" 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /config/sites/main/config.yaml: -------------------------------------------------------------------------------- 1 | base: '/' 2 | dependencies: 3 | - my-vendor/my-site-package 4 | languages: 5 | - 6 | title: English 7 | enabled: true 8 | locale: en_US.UTF-8 9 | base: / 10 | navigationTitle: English 11 | flag: us 12 | languageId: 0 13 | rootPageId: 1 14 | websiteTitle: '' 15 | -------------------------------------------------------------------------------- /config/sites/main/page.tsconfig: -------------------------------------------------------------------------------- 1 | TCEMAIN { 2 | permissions.groupid = 1 3 | } 4 | -------------------------------------------------------------------------------- /config/sites/main2/page.tsconfig: -------------------------------------------------------------------------------- 1 | TCEMAIN { 2 | permissions.groupid = 1 3 | } 4 | -------------------------------------------------------------------------------- /config/system/additional.php: -------------------------------------------------------------------------------- 1 | [ 7 | 'Connections' => [ 8 | 'Default' => [ 9 | 'dbname' => 'db', 10 | 'driver' => 'mysqli', 11 | 'host' => 'db', 12 | 'password' => 'db', 13 | 'port' => '3306', 14 | 'user' => 'db', 15 | ], 16 | ], 17 | ], 18 | // This GFX configuration allows processing by installed ImageMagick 6 19 | 'GFX' => [ 20 | 'processor' => 'ImageMagick', 21 | 'processor_path' => '/usr/bin/', 22 | 'processor_path_lzw' => '/usr/bin/', 23 | ], 24 | // This mail configuration sends all emails to mailpit 25 | 'MAIL' => [ 26 | 'transport' => 'smtp', 27 | 'transport_smtp_encrypt' => false, 28 | 'transport_smtp_server' => 'localhost:1025', 29 | ], 30 | 'SYS' => [ 31 | 'trustedHostsPattern' => '.*.*', 32 | 'devIPmask' => '*', 33 | 'displayErrors' => 1, 34 | 'systemLocale' => 'en_US.utf8', 35 | 'features' => [ 36 | 'unifiedPageTranslationHandling' => true, 37 | 'yamlImportsFollowDeclarationOrder' => true, 38 | 'security.backend.enforceReferrer' => false, 39 | ], 40 | // This is required to fix "Mixed Block" 41 | 'reverseProxySSL' => '*', 42 | 'reverseProxyIP' => '*', 43 | 'reverseProxyHeaderMultiValue' => 'first' 44 | ], 45 | ] 46 | ); 47 | -------------------------------------------------------------------------------- /config/system/settings.php: -------------------------------------------------------------------------------- 1 | [ 4 | 'debug' => true, 5 | 'installToolPassword' => '$argon2i$v=19$m=65536,t=16,p=1$MGYzallDakt5WFd4SFpETA$+qV7r8xrV061skKc7xDz83C3btgpyiRQVarvHO3kcmE', 6 | 'passwordHashing' => [ 7 | 'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash', 8 | 'options' => [], 9 | ], 10 | ], 11 | 'DB' => [ 12 | 'Connections' => [ 13 | 'Default' => [ 14 | 'charset' => 'utf8mb4', 15 | 'dbname' => 'db', 16 | 'defaultTableOptions' => [ 17 | 'charset' => 'utf8mb4', 18 | 'collation' => 'utf8mb4_unicode_ci', 19 | ], 20 | 'driver' => 'mysqli', 21 | 'host' => 'db', 22 | 'password' => 'db', 23 | 'port' => 3306, 24 | 'user' => 'db', 25 | ], 26 | ], 27 | ], 28 | 'EXTENSIONS' => [ 29 | 'backend' => [ 30 | 'backendFavicon' => '', 31 | 'backendLogo' => '', 32 | 'loginBackgroundImage' => '', 33 | 'loginFootnote' => '', 34 | 'loginHighlightColor' => '', 35 | 'loginLogo' => '', 36 | 'loginLogoAlt' => '', 37 | ], 38 | 'extensionmanager' => [ 39 | 'automaticInstallation' => '1', 40 | 'offlineMode' => '0', 41 | ], 42 | ], 43 | 'FE' => [ 44 | 'cacheHash' => [ 45 | 'enforceValidation' => true, 46 | ], 47 | 'debug' => true, 48 | 'disableNoCacheParameter' => true, 49 | 'passwordHashing' => [ 50 | 'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash', 51 | 'options' => [], 52 | ], 53 | ], 54 | 'GFX' => [ 55 | 'processor' => 'GraphicsMagick', 56 | 'processor_effects' => false, 57 | 'processor_enabled' => true, 58 | 'processor_path' => '/usr/bin/', 59 | ], 60 | 'LOG' => [ 61 | 'TYPO3' => [ 62 | 'CMS' => [ 63 | 'deprecations' => [ 64 | 'writerConfiguration' => [ 65 | 'notice' => [ 66 | 'TYPO3\CMS\Core\Log\Writer\FileWriter' => [ 67 | 'disabled' => false, 68 | ], 69 | ], 70 | ], 71 | ], 72 | ], 73 | ], 74 | ], 75 | 'MAIL' => [ 76 | 'transport' => 'sendmail', 77 | 'transport_sendmail_command' => '/usr/local/bin/mailpit sendmail -t --smtp-addr 127.0.0.1:1025', 78 | 'transport_smtp_encrypt' => '', 79 | 'transport_smtp_password' => '', 80 | 'transport_smtp_server' => '', 81 | 'transport_smtp_username' => '', 82 | ], 83 | 'SYS' => [ 84 | 'UTF8filesystem' => true, 85 | 'caching' => [ 86 | 'cacheConfigurations' => [ 87 | 'hash' => [ 88 | 'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend', 89 | ], 90 | 'pages' => [ 91 | 'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend', 92 | 'options' => [ 93 | 'compression' => true, 94 | ], 95 | ], 96 | 'rootline' => [ 97 | 'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend', 98 | 'options' => [ 99 | 'compression' => true, 100 | ], 101 | ], 102 | ], 103 | ], 104 | 'devIPmask' => '*', 105 | 'displayErrors' => 1, 106 | 'encryptionKey' => '99bbc58adc40d9abb869e63c803c4757ff3e4d3831ece89c49d8ef8a0c81a6e4a3ca34597c8d1496e243cd74c7c28d26', 107 | 'exceptionalErrors' => 12290, 108 | 'features' => [ 109 | 'frontend.cache.autoTagging' => true, 110 | ], 111 | 'sitename' => '"Automated Setup"', 112 | 'systemMaintainers' => [ 113 | 1, 114 | ], 115 | ], 116 | ]; 117 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | services: 2 | typo3: 3 | build: 4 | context: . 5 | container_name: my-typo3 6 | ports: 7 | - "8082:80" 8 | environment: 9 | TYPO3_CONTEXT: Development/Docker 10 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | cd /var/www/html 5 | 6 | # Run sitepackage generator first (must be before composer install) 7 | echo "🔧 Downloading the generated site package from https://get.typo3.org/sitepackage ..." 8 | ./Build/DownloadSitePackage/generate_sitepackage.sh 9 | 10 | composer install --no-interaction 11 | 12 | # Ensure required directories exist and have correct ownership 13 | mkdir -p var public/fileadmin public/typo3temp config/system 14 | 15 | echo "▶ Running automated TYPO3 setup..." 16 | 17 | ./vendor/bin/typo3 setup --force \ 18 | --driver 'sqlite' \ 19 | --dbname '/var/www/html/var/data.sqlite' \ 20 | --admin-username 'j.doe' \ 21 | --admin-user-password 'Password.1' \ 22 | --admin-email 'j.doe@example.org' \ 23 | --create-site '' \ 24 | --project-name "TYPO3 Docs Demo" \ 25 | --server-type 'apache' 26 | 27 | echo "✅ TYPO3 setup complete." 28 | 29 | echo "▶ Setting up extensions..." 30 | ./vendor/bin/typo3 extension:setup 31 | 32 | # Set correct ownership for TYPO3 runtime directories 33 | chown -R www-data:www-data var public config 34 | 35 | echo "" 36 | echo "🚀 TYPO3 is up and running!" 37 | echo "🌐 TYPO3 is running — access it via the mapped port (e.g. http://localhost:8080)" 38 | echo "" 39 | echo "📂 Admin Login:" 40 | echo " Username: j.doe" 41 | echo " Password: Password.1" 42 | echo "" 43 | 44 | # Start Apache in the foreground 45 | exec apache2-foreground 46 | -------------------------------------------------------------------------------- /gitpod-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | set -e 4 | 5 | if [ -f .env ]; then 6 | set -o allexport 7 | source .env 8 | set +o allexport 9 | fi 10 | 11 | ./Build/DownloadSitePackage/generate_sitepackage.sh 12 | 13 | # 1. Install dependencies 14 | composer install 15 | 16 | # 3. Run TYPO3 setup 17 | vendor/bin/typo3 setup --force --no-interaction 18 | 19 | # 4. Install extensions 20 | vendor/bin/typo3 extension:setup 21 | 22 | # 5. Create demo users 23 | vendor/bin/typo3 setup:begroups:default -g Both 24 | vendor/bin/typo3 backend:user:create --username=e.doe --password=UnsaFe123! --groups=1 --email=e.doe@example.org --no-interaction 25 | vendor/bin/typo3 backend:user:create --username=a.doe --password=UnsaFe123! --groups=1,2 --email=a.doe@example.org --no-interaction 26 | echo "User e.doe demonstrates standard editor permissions, a.doe advanced editor permissions" 27 | 28 | echo "TYPO3 is ready at http://localhost:8000 (user: j.doe / UnsaFe123!)" 29 | -------------------------------------------------------------------------------- /packages/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/TYPO3-Documentation/site-introduction/2c1d06b787363072bb887515fbce52c15dc32990/packages/.gitkeep --------------------------------------------------------------------------------