All Projects → t3easy → docker-typo3

t3easy / docker-typo3

Licence: other
Environment to develop and run TYPO3 in Docker containers

Programming Languages

PHP
23972 projects - #3 most used programming language
Dockerfile
14818 projects
shell
77523 projects

Projects that are alternatives of or similar to docker-typo3

rest
REST webservices for TYPO3 CMS
Stars: ✭ 78 (+387.5%)
Mutual labels:  typo3-cms, typo3
typo3v10 example sitepackage
Site package extension for TYPO3 10 feature demonstration
Stars: ✭ 13 (-18.75%)
Mutual labels:  typo3-cms, typo3
t3extblog
A record based blog extension for TYPO3 CMS powered by Extbase / Fluid. Flexible and powerful!
Stars: ✭ 30 (+87.5%)
Mutual labels:  typo3-cms, typo3
content defender
Define allowed or denied content element types in your backend layouts
Stars: ✭ 63 (+293.75%)
Mutual labels:  typo3-cms, typo3
schema
TYPO3 extension providing an API and view helpers for schema.org markup
Stars: ✭ 19 (+18.75%)
Mutual labels:  typo3-cms, typo3
mask export
Export your mask elements as extension
Stars: ✭ 45 (+181.25%)
Mutual labels:  typo3-cms, typo3
Aimeos Typo3
TYPO3 e-commerce extension for professional, ultra fast online shops, complex B2B applications and #gigacommerce
Stars: ✭ 157 (+881.25%)
Mutual labels:  typo3
Typo3 Realurl
**Vintage** RealURL extension for TYPO3 CMS. Read the wiki if you have questions!
Stars: ✭ 119 (+643.75%)
Mutual labels:  typo3
Ext Solr
A TYPO3 extension that integrates the Apache Solr search server with TYPO3 CMS. dkd Internet Service GmbH is developing the extension. Community contributions are welcome. See CONTRIBUTING.md for details.
Stars: ✭ 118 (+637.5%)
Mutual labels:  typo3
ddev-for-typo3-extensions
This repo contains an example DDEV configuration to provide a development environment for a single TYPO3 CMS extension.
Stars: ✭ 22 (+37.5%)
Mutual labels:  typo3
Typo3 Rector
Rector for TYPO3
Stars: ✭ 107 (+568.75%)
Mutual labels:  typo3
Frontend editing
TYPO3 CMS frontend editing
Stars: ✭ 98 (+512.5%)
Mutual labels:  typo3
Typo3 Docker Boilerplate
🍲 TYPO3 Docker Boilerplate project (NGINX, Apache HTTPd, PHP-FPM, MySQL, Solr, Elasticsearch, Redis, FTP)
Stars: ✭ 240 (+1400%)
Mutual labels:  typo3
autoloader
⚙️ Best TYPO3 Swiss Army knife ever ⚙️
Stars: ✭ 22 (+37.5%)
Mutual labels:  typo3
webp
Create a WebP copy for images (TYPO3 CMS)
Stars: ✭ 57 (+256.25%)
Mutual labels:  typo3
urlguard
TYPO3 extension urlguard. Allows to define what query parameters will be passed to newly created typolinks.
Stars: ✭ 16 (+0%)
Mutual labels:  typo3
idea-php-typo3-plugin
TYPO3 CMS Plugins for IntelliJ IDEA / PhpStorm
Stars: ✭ 93 (+481.25%)
Mutual labels:  typo3-cms
vscode-typo3-typoscript
An extension for VS Code which provides support for the TypoScript syntax.
Stars: ✭ 18 (+12.5%)
Mutual labels:  typo3
TYPO3-Distribution
TYPO3 CMS Distribution (Composer Mode) with TYPO3 console and custom application environment support.
Stars: ✭ 28 (+75%)
Mutual labels:  typo3-cms
migration
TYPO3 Migration Framework for every kind of migration/imports from CLI (e.g. Templavoila to Gridelements, tt_news to news, etc...)
Stars: ✭ 52 (+225%)
Mutual labels:  typo3

TYPO3 Bootcamp - an Environment to develop and run TYPO3 in Docker containers

Requirements:

  1. Docker(4Mac) 17.09 or greater for build
  2. Docker Compose (included in Docker4Mac)
  3. composer
  4. A Traefik reverse proxy, e.g. docker-frontend or include .docker/env.direct.yml and set WEB_PORT.

Start a new project

  1. composer create-project t3easy/typo3-bootcamp awesome-project.tld
    (Or clone the project with git and checkout the desired branch)
  2. Change to awesome-project.tld / open it in you favorite IDE
  3. Rename .env.dev to .env and adjust it to your needs, see below and comments in the file for more information E.g. VHOST=typo3.localhost
    If you use a .localhost vhost, you can access it with Chrome w/o a host entry.
    See: https://tools.ietf.org/html/rfc2606#page-2
  4. Add your vhost as a hosts entry for 127.0.0.1 / the box you're running docker on
  5. Start the environment with docker-compose up -d
  6. Setup TYPO3
    1. With TYPO3 Console
      docker-compose exec -u www-data typo3 vendor/bin/typo3cms install:setup
    2. Or with the browser
      docker-compose exec -u www-data typo3 touch /app/private/FIRST_INSTALL
      Open http://typo3.localhost/typo3/install.php and configure TYPO3
  7. Go to

.env

In this file you define the environment you'd like to setup. There are two examples, .env.dev to start an development environment and .env.prod as a template to build and deploy your project.

To check the result, run docker-compose config.
To deploy to a swarm write the result to a file docker-compose config > stack.yml and use it docker stack deploy --compose-file stack.yml myproject

COMPOSE_PROJECT_NAME

A unique project name. It must not contain dots. E.g. project-typo3version like company-typo3v11 See https://docs.docker.com/compose/reference/envvars/#compose_project_name for more details

COMPOSE_FILE

Add all necessary compose files separated with :, always start with the root docker-compose.yml to have a proper project name and relative paths. The settings of the last config wins. More at https://docs.docker.com/compose/reference/envvars/#compose_file

VHOST

The FQDN of the TYPO3 project. It gets prefixed for other services, e.g. if you set VHOST to typo3.localhost, you can reach Adminer at adminer-typo3.localhost and Mailhog at mailhog-typo3.localhost.

ADDITIONAL_VHOSTS

Adds additional names to the TYPO3 web service. The value must start with a comma (,). Example ,2nd.domain.tld,3rd.domain.tld

FRONTEND_NETWORK

The name of the docker network that Traefik can use to connect to the web service.

RESTART

Define the restart policy for all services. Should be always for production and no for development.

DB_IMAGE

The image of the db service, see

Example mariadb:10.2

MYSQL_ROOT_PASSWORD

Set the password of the root db user. You should not set the password in the .env file for production setup. Set it on CLI

MYSQL_ROOT_PASSWORD=MyV3rySecretP4sswd docker-compose up -d

or set it in CI variables.

DB_BIND_TO

Bind the db service to a specified ip and port. Format IP:Port Use 127.0.0.1: to publish a dynamic port to localhost only. Use 127.0.0.1:13306 to publish the port 13306. Use 13306 to publish 13306 to all available IP. ATTENTION! That allows access from anywhere! The port is mapped to 3306, the MySQL/MariaDB port, inside the container. See Access the database during development via tcp

REDIS and LDAP

Build the TYPO3 image with that PHP extensions.

WEB_PORT

The port the web container expose. Only if you use .docker/env.direct.yml.

TRAEFIK_ENTRYPOINT_HTTP and TRAEFIK_ENTRYPOINT_HTTPS

Names of the Traefik entrypoints

Build

To build a productive environment use docker-compose -f .docker/build.yml from the root with an prepared .env or by setting REDIS and LDAP in the environment of the builder. If you build on GitLab CI, you can use .docker/env.gitlab.yml to tag your images. See .gitlab-ci.example.yml.

Deploy

See .gitlab-ci.example.yml for an example how to deploy to docker hosts with GitLab CI. Consider 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. https://docs.docker.com/compose/reference/envvars/#compose_project_name

Access the database during development via tcp

A dynamic port is mapped to the database service port 3306. To get this port run:

docker-compose ps db

You'll get something like:

      Name                    Command               State             Ports          
-------------------------------------------------------------------------------------
project_db_1       docker-entrypoint.sh --cha ...   Up      127.0.0.1:32770->3306/tcp

where 32770 is the port on the local docker host to connect to.

Run TYPO3 Console commands

To run a command inside the TYPO3 PHP Container use docker-compose: E.g. flush the cache

docker-compose exec -u www-data typo3 typo3cms cache:flush

Import/export the database

Export database

docker-compose exec -T db sh -c 'exec mysqldump --opt --single-transaction -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"' > dump.sql

Import a sql dump

docker-compose exec -T db sh -c 'exec mysql -u"$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE"' < dump.sql
# Setup new/development extensions
docker-compose exec -u www-data typo3 typo3cms extension:setupactive --verbose

Import directly from remote

ssh 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"'
# Setup new/development extensions
docker-compose exec -u www-data typo3 typo3cms extension:setupactive --verbose

Why can't you use typo3-console to import/export the database to/from the docker environment

The TYPO3 PHP image does not include mysql or mysqldump binary which are required by typo3-console.

Play with docker

Start a demo stack:

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].