All Projects → ctsmedia → docker-contao

ctsmedia / docker-contao

Licence: MIT license
Setup Contao Projects with docker

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to docker-contao

docs-archive
Contao Documentation
Stars: ✭ 44 (+109.52%)
Mutual labels:  contao
managed-edition
Contao Managed Edition
Stars: ✭ 15 (-28.57%)
Mutual labels:  contao
contao-events subscriptions
Contao extension that allows members of your website to subscribe to the events
Stars: ✭ 12 (-42.86%)
Mutual labels:  contao
contao-theme-framework
A new standardized and database-less way to build frontend themes in Contao.
Stars: ✭ 13 (-38.1%)
Mutual labels:  contao
contao-cookiebar
Display the information about cookies on your Contao website
Stars: ✭ 27 (+28.57%)
Mutual labels:  contao
catalog-manager
Backend Module ohne Programmierkenntnisse erstellen.
Stars: ✭ 28 (+33.33%)
Mutual labels:  contao
contao-content-api-bundle
Contao JSON-API
Stars: ✭ 41 (+95.24%)
Mutual labels:  contao
core
Bootstrap 4 Contao Core Component
Stars: ✭ 16 (-23.81%)
Mutual labels:  contao
check
Contao Check
Stars: ✭ 49 (+133.33%)
Mutual labels:  contao
contao-leads
No description or website provided.
Stars: ✭ 31 (+47.62%)
Mutual labels:  contao
contao-ajax reload element
AjaxReloadElement for Contao Open Source CMS
Stars: ✭ 15 (-28.57%)
Mutual labels:  contao

Contao Docker container using managed edition

Run a fresh Contao installation or contao demo within a minute.

Run clean Contao installation

  1. Download or copy the contents of the docker-compose.yml file. No need to checkout the repository unless you want to build your own specific versions.
  2. Set the contao version you want to run in the docker-compose.yml. Otherwise the latest version will be used. You can find all pre build versions here
  3. Startup docker with docker-compose up -d
  4. Load http://localhost/contao/install in you browser
  5. Proceed with the default installation process

Run Contao demo*

  1. Download or copy the contents of the docker-compose.yml file. No need to checkout the repository unless you want to build your own specific versions.
  2. Startup docker with docker-compose up -d in your terminal and the current folder
  3. Run docker exec --user www-data contao_php bash -c "php ../install-demo.php"
  4. The demo is now running at http://localhost/

  • Right now we provide demo data which should at least work with 4.4 and upwards versions.
  • The install tool password for the demo is contaodocker
  • *The demo data is based on the work of forums. Thanks to Andreas.

Contao Manager

This setup also provides the Contao Manager. You can access it via calling http://localhost/contao-manager.php

Troubleshooting

  • if you have run maintenance tasks via cli from the php container as root, make sure it's accessible for www-data user
  • the demo data is not tested against every version. Maybe checking the install tool helps
  • if you have switched between contao versions and the style looks broken you may want to clear the browser cache
  • run the maintenance tasks via contao backend (that way it's done as www-data user directly)

Versions

You can use minor versions like 4.4 or 4.3 or full versions incl. bugfix releases. Minor version are built against the latest bugfix release. if you choose for example 4.3 it was built using 4.3.11.

See all pre built versions here

Stop containers

  1. Run either docker-compose down or docker-compose down -v. The latter one will also delete the data volume which was used. Good if you want a fresh start.

The demo data prepared for contao 4 is taken from the forums Thanks to Andreas.

Develop Contao Extensions / Bundles

This setup is also perfectly suited for easily develop contao bundles. If you for example develop a bundle named "ctsmedia/test-bundle".

  1. Copy the docker-compose.yml into your bundle folder
  2. Add a bind entry to load your bundle into the container
  php:
    image: ctsmedia/contao:latest
    environment:
      DEFAULT_PASSWORD: *password
      PROJECT_NAME: *project
    ports:
      - "9000"
    volumes:
      - /var/www/share/project
      - ./test-bundle:/var/www/share/test-bundle:ro
  1. Connect to the container: docker exec -it contao_php bash
  2. Add the bundle to the contao installation
    4.1 docker exec --user www-data contao_php bash -c "composer config repositories.test-bundle path ../test-bundle"
    4.2 docker exec --user www-data contao_php bash -c "composer require cts/test-bundle:*" (Make sure the composer.json in test-bundle folder has a version entry. otherwise it can not recognized, we use www-data so we don't get any problems with written files by postcripts)

Building

if you want to build a specific version which is not remotely available you can do so by running:

docker build -t ctsmedia/contao:4.4.1  --build-arg CONTAO_VERSION=4.4.1  .

Full composer version constraints are allowed. You could for example to the following

docker build -t ctsmedia/contao:4-latest  --build-arg CONTAO_VERSION=^4.4  .

or

docker build -t ctsmedia/contao:4.4-latest  --build-arg CONTAO_VERSION=4.4.*  .
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].