{"id":16698852,"url":"https://github.com/t3easy/docker-typo3","last_synced_at":"2025-03-21T19:32:40.532Z","repository":{"id":47528332,"uuid":"97225379","full_name":"t3easy/docker-typo3","owner":"t3easy","description":"Environment to develop and run TYPO3 in Docker containers","archived":false,"fork":false,"pushed_at":"2023-07-28T12:13:34.000Z","size":239,"stargazers_count":17,"open_issues_count":12,"forks_count":6,"subscribers_count":5,"default_branch":"main","last_synced_at":"2024-10-19T22:50:06.069Z","etag":null,"topics":["docker","docker-compose","docker-image","typo3","typo3-cms"],"latest_commit_sha":null,"homepage":"https://packagist.org/packages/t3easy/typo3-bootcamp","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/t3easy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-14T11:06:15.000Z","updated_at":"2023-07-14T14:58:01.000Z","dependencies_parsed_at":"2024-10-12T18:04:27.319Z","dependency_job_id":"881ebf40-2274-4c0e-bc4b-0a2cf44d9059","html_url":"https://github.com/t3easy/docker-typo3","commit_stats":{"total_commits":234,"total_committers":3,"mean_commits":78.0,"dds":"0.10683760683760679","last_synced_commit":"0c516a97238806204e1596c3abb1216a4ce0b33a"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3easy%2Fdocker-typo3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3easy%2Fdocker-typo3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3easy%2Fdocker-typo3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/t3easy%2Fdocker-typo3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/t3easy","download_url":"https://codeload.github.com/t3easy/docker-typo3/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221818129,"owners_count":16885693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","docker-image","typo3","typo3-cms"],"created_at":"2024-10-12T18:04:18.378Z","updated_at":"2024-10-28T10:43:15.990Z","avatar_url":"https://github.com/t3easy.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# TYPO3 Bootcamp - an Environment to develop and run TYPO3 in Docker containers\n\n### Requirements:\n1.  Docker(4Mac) 17.09 or greater for build\n1.  [Docker Compose](https://docs.docker.com/compose/install/) (included in Docker4Mac)\n1.  composer\n1.  A Traefik reverse proxy, e.g. [docker-frontend](https://github.com/t3easy/docker-frontend)\n    or include `.docker/env.direct.yml` and set `WEB_PORT`.\n\n### Start a new project\n1.  `composer create-project t3easy/typo3-bootcamp awesome-project.tld`  \n    (Or clone the project with git and checkout the desired branch)\n1.  Change to awesome-project.tld / open it in you favorite IDE\n1.  Rename `.env.dev` to `.env` and adjust it to your needs, see below and comments in the file for more information\n    E.g. `VHOST=typo3.localhost`  \n    If you use a `.localhost` vhost, you can access it with Chrome w/o a host entry.  \n    See: \u003chttps://tools.ietf.org/html/rfc2606#page-2\u003e\n1.  Add your vhost as a hosts entry for 127.0.0.1 / the box you're running docker on\n1.  Start the environment with `docker-compose up -d`\n1.  Setup TYPO3  \n    1.  With TYPO3 Console  \n        ```bash\n        docker-compose exec -u www-data typo3 vendor/bin/typo3cms install:setup\n        ```\n    1.  Or with the browser  \n        ```bash\n        docker-compose exec -u www-data typo3 touch /app/private/FIRST_INSTALL\n        ```\n        Open \u003chttp://typo3.localhost/typo3/install.php\u003e and configure TYPO3\n1.  Go to\n    * \u003chttp://typo3.localhost/\u003e for TYPO3 frontend\n    * \u003chttp://typo3.localhost/typo3/\u003e for TYPO3 backend\n    * \u003chttp://adminer-typo3.localhost/\u003e for Adminer\n    * \u003chttp://mailhog-typo3.localhost\u003e for Mailhog\n\n## .env\nIn this file you define the environment you'd like to setup.\nThere are two examples, `.env.dev` to start an development environment and `.env.prod` as a template to build and deploy your project.\n\nTo check the result, run `docker-compose config`.  \nTo deploy to a swarm write the result to a file `docker-compose config \u003e stack.yml` and use it `docker stack deploy --compose-file stack.yml myproject`\n\n### COMPOSE_PROJECT_NAME\nA unique project name. It must not contain dots.\nE.g. project-typo3version like company-typo3v11\nSee \u003chttps://docs.docker.com/compose/reference/envvars/#compose_project_name\u003e for more details\n\n### COMPOSE_FILE\nAdd all necessary compose files separated with `:`, always start with the root `docker-compose.yml` to have a proper project name and relative paths.\nThe settings of the last config wins.\nMore at \u003chttps://docs.docker.com/compose/reference/envvars/#compose_file\u003e\n\n### VHOST\nThe FQDN of the TYPO3 project.\nIt gets prefixed for other services, e.g. if you set VHOST to `typo3.localhost`,\nyou can reach Adminer at `adminer-typo3.localhost` and Mailhog at `mailhog-typo3.localhost`.\n\n### ADDITIONAL_VHOSTS\nAdds additional names to the TYPO3 web service. The value must start with a comma (`,`).\nExample `,2nd.domain.tld,3rd.domain.tld`\n\n### FRONTEND_NETWORK\nThe name of the docker network that Traefik can use to connect to the web service.\n\n### RESTART\nDefine the restart policy for all services.\nShould be `always` for production and `no` for development.\n\n### DB_IMAGE\nThe image of the db service, see\n\n* \u003chttps://hub.docker.com/_/mariadb/\u003e\n* \u003chttps://hub.docker.com/_/mysql/\u003e\n* \u003chttps://forge.typo3.org/issues/82023#note-8\u003e\n\nExample `mariadb:10.2`\n\n### MYSQL_ROOT_PASSWORD\nSet the password of the root db user.\nYou should not set the password in the `.env` file for production setup.\nSet it on CLI \n```bash\nMYSQL_ROOT_PASSWORD=MyV3rySecretP4sswd docker-compose up -d\n```\nor set it in CI variables.\n\n### DB_BIND_TO\nBind the db service to a specified ip and port.\nFormat `IP:Port`\nUse `127.0.0.1:` to publish a dynamic port to localhost only.\nUse `127.0.0.1:13306` to publish the port `13306`.\nUse `13306` to publish `13306` to all available IP. ATTENTION! That allows access from anywhere!\nThe port is mapped to 3306, the MySQL/MariaDB port, inside the container.\nSee [Access the database during development via tcp](#access-the-database-during-development-via-tcp)\n\n### REDIS and LDAP\nBuild the TYPO3 image with that PHP extensions.\n\n### WEB_PORT\nThe port the web container expose. Only if you use `.docker/env.direct.yml`.\n\n### TRAEFIK_ENTRYPOINT_HTTP and TRAEFIK_ENTRYPOINT_HTTPS\nNames of the Traefik entrypoints\n\n## Build\nTo build a productive environment use `docker-compose -f .docker/build.yml` from the root with an prepared `.env`\nor by setting REDIS and LDAP in the environment of the builder.\nIf you build on GitLab CI, you can use `.docker/env.gitlab.yml` to tag your images.\nSee `.gitlab-ci.example.yml`.\n\n## Deploy\nSee `.gitlab-ci.example.yml` for an example how to deploy to docker hosts with GitLab CI.\nConsider to set `COMPOSE_PROJECT_NAME` at the deploy job, to be able to deploy the project multiple times to the same docker-host, e.g. testing, staging and live.\n\u003chttps://docs.docker.com/compose/reference/envvars/#compose_project_name\u003e\n\n## Access the database during development via tcp\nA dynamic port is mapped to the database service port 3306. To get this port run:\n```bash\ndocker-compose ps db\n```\nYou'll get something like:\n```\n      Name                    Command               State             Ports          \n-------------------------------------------------------------------------------------\nproject_db_1       docker-entrypoint.sh --cha ...   Up      127.0.0.1:32770-\u003e3306/tcp\n```\nwhere `32770` is the port on the local docker host to connect to. \n\n## Run TYPO3 Console commands\n\nTo run a command inside the TYPO3 PHP Container use `docker-compose`:\nE.g. flush the cache\n```\ndocker-compose exec -u www-data typo3 typo3cms cache:flush\n```\n\n## Import/export the database\n\n### Export database\n```shell\ndocker-compose exec -T db sh -c 'exec mysqldump --opt --single-transaction -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\" \"$MYSQL_DATABASE\"' \u003e dump.sql\n```\n### Import a sql dump\n```shell\ndocker-compose exec -T db sh -c 'exec mysql -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\" \"$MYSQL_DATABASE\"' \u003c dump.sql\n# Setup new/development extensions\ndocker-compose exec -u www-data typo3 typo3cms extension:setupactive --verbose\n```\n\n### Import directly from remote\n```shell\nssh user@server 'TYPO3_CONTEXT=\"Production\" /path/to/typo3cms database:export' | docker-compose exec -T db sh -c 'exec mysql -u\"$MYSQL_USER\" -p\"$MYSQL_PASSWORD\" \"$MYSQL_DATABASE\"'\n# Setup new/development extensions\ndocker-compose exec -u www-data typo3 typo3cms extension:setupactive --verbose\n```\n\n### Why can't you use typo3-console to import/export the database to/from the docker environment\nThe TYPO3 PHP image does not include mysql or mysqldump binary which are required by typo3-console.\n\n## Play with docker\nStart a demo stack:\n*  [TYPO3 12](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/t3easy/docker-typo3/12.x/.docker/pwd/stack.yml)\n*  [TYPO3 11 LTS](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/t3easy/docker-typo3/11.x/.docker/pwd/stack.yml)\n*  [TYPO3 10 LTS](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/t3easy/docker-typo3/10.x/.docker/pwd/stack.yml)\n*  [TYPO3 9 LTS](https://labs.play-with-docker.com/?stack=https://raw.githubusercontent.com/t3easy/docker-typo3/9.x/.docker/pwd/stack.yml)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3easy%2Fdocker-typo3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ft3easy%2Fdocker-typo3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ft3easy%2Fdocker-typo3/lists"}