Sign inSign up

webtp3/typo3

By webtp3

•Updated about 8 years ago

automated build for testing

Image
0

366

webtp3/typo3 repository overview

⁠tp3/docker

TYPO3 docker testing image - This image is part of an automated testing enviroment. Webservice can be linked to MySQL. More about the automated testing https://bitbucket.org/web-tp3/tp3_installer⁠

⁠Usage (standalone)

This image needs an external MySQL server or linked MySQL container. To create a MySQL container:

docker run -d -e MYSQL_ROOT_PASSWORD="my-secret-pw" --name db -p 3306:3306 webtp3/tp3sql

To run TYPO3 by linking to the database created above:

docker run -d --link db:db -e DB_PASS="<your_password>" -p 80:80 webtp3/docker:16.4-stable

Following branches are available: 8-stable (with typo3 installed) 16.4-stable (just apache and php 7.1 - waiting for install in /var/www/html) 18.4-stable (just apache and php 7.2 - waiting for install in /var/www/html)

docker cp typo3 /from/ /to/        (Copy files/folders between a container and the local filesystem)

⁠Usage (combined)

ia docker stack deploy or docker-compose

docker-compose -f docker-compose.yml up

Now, you can use your web browser to access TYPO3 from the the follow address:

http://localhost/typo3

User is "tp3min" and password is "Init1111".

The mysql Adminer

http://localhost:8080

Mysql Server can also be reached from outside on port 3306

SSH Server also for Rsync and other stuff to use ssh server there is a user typo3user that needs a password (docker exec...) graphicsmagick, imagemagick, letscrypt, openssl, php-xdebug and I think all what you need.

###start the server

You can easyly create your ohne Docker file based on this installation and deploy your app to it Create a Dockerfile like the following:

FROM webtp3/docker:18.4-stable

RUN apt-get update && apt-get install -yq
ADD . /var/www/html
# start composer install
RUN composer config  repositories.local path 'Packages/*' -d  /var/www/html/
RUN  omposer --dev update -d  /var/www/html/

# Expose environment variables for automated setup
ENV DB_HOST **LinkMe**
ENV DB_PORT **LinkMe**
ENV DB_NAME typo3
ENV DB_USER root
ENV DB_PASS my-secret-pw
ENV INSTALL_TOOL_PASSWORD password

#serverroot is in /var/www/html/web we use the vendor dir for that
# for productive enviroment we recommend to ouse the flag --no-dev

next is if you have docker installed you run in the root of your Projekt

docker build -t yourtest  .
docker run -d -e MYSQL_ROOT_PASSWORD="my-secret-pw" --name db -p 3306:3306 webtp3/tp3sql
docker run -d  --rm -it -v $PWD:/build --link db:db -e DB_PASS="my-secret-pw" -p 80:80 --name typo3 yourtest
     
⁠start testing
docker exec typo3 php vendor/phpunit/phpunit/phpunit --configuration web/typo3conf/ext/cag_tests/Tests/Build/UnitTests.xml --teamcity --log-junit 
docker exec typo3 php vendor/phpunit/phpunit/phpunit --configuration web/typo3conf/ext/cag_tests/Tests/Build/UnitTestsDeprecated.xml --teamcity --log-junit 
docker exec typo3 php vendor/phpunit/phpunit/phpunit --configuration web/typo3conf/ext/cag_tests/Tests/Build/FunctionalTests.xml --teamcity --log-junit 
docker exec typo3 mkdir -p web/typo3temp/var/tests
docker exec typo3 vendor/bin/chromedriver --url-base=/wd/hub >/dev/null 2>&1 &
docker exec typo3 php -S 0.0.0.0:8000 >/dev/null 2>&1 &
docker exec typo3 sleep 3;
docker exec typo3 typo3DatabaseName='typo3' typo3DatabaseHost='DB' typo3DatabaseUsername='root' typo3DatabasePassword='my-secret-pw' vendor/codeception/codeception/codecept run Acceptance -c web/typo3conf/ext/cag_tests/Tests/Build/AcceptanceTests.yml

docker stop typo3
docker stop db

by changing "my-secret-pw" you change the passwords of the systems

install typo3 via cli

       docker exec typo3 bash /var/www/cgi-bin/run-typo3.sh

⁠Documentation

more about the base images an be found on the docker hub:

https://hub.docker.com/r/webtp3/docker⁠

https://github.com/webtp3/docker⁠

The System runs with a php fastcgi wrapper. So you can easyly swap php Versions to tests on several ons.

The mysql Adminer

http://localhost:8080

Mysql Server can also be reached from outside on port 3306

SSH Server also for Rsync and other stuff to use ssh server there is a user typo3user that needs a password (docker exec...) graphicsmagick, imagemagick, letscrypt, openssl, php-xdebug and I think all what you need.

###switch php

 docker exec typo3 rm /etc/alternatives/php
docker exec typo3 ln -s /usr/bin/php7.1 /etc/alternatives/php
docker exec typo3 php -v

PHP 7.1.19-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Jul 9 2018 13:12:24) ( NTS ) Copyright (c) 1997-2018 The PHP Group Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies with Zend OPcache v7.1.19-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies with Xdebug v2.6.0, Copyright (c) 2002-2018, by Derick Rethans

###start the server

You can easyly create your ohne Docker file based on this installation and deploy your app to it Create a Dockerfile like the following:

FROM webtp3/docker:16.4-stable

RUN apt-get update && apt-get install -yq
ADD . /var/www/html
# start composer install
RUN composer config  repositories.local path 'Packages/*' -d  /var/www/html/
RUN  composer --dev install -d  /var/www/html/

# Expose environment variables for automated setup
ENV DB_HOST **LinkMe**
ENV DB_PORT **LinkMe**
ENV DB_NAME typo3
ENV DB_USER root
ENV DB_PASS my-secret-pw
ENV INSTALL_TOOL_PASSWORD password

#serverroot is in /var/www/html/web we use the vendor dir for that
# for productive enviroment we recommend to ouse the flag --no-dev

next is if you have docker installed you run in the root of your Projekt

docker -t yourtest build .
docker run -d -e MYSQL_ROOT_PASSWORD="my-secret-pw" --name db -p 3306:3306 webtp3/tp3sql
docker run -d  --rm -it -v $PWD:/build --link db:db -e DB_PASS="my-secret-pw" -p 80:80 --name typo3 yourtest
     
⁠start testing
docker exec typo3 php vendor/phpunit/phpunit/phpunit --configuration web/typo3conf/ext/cag_tests/Tests/Build/UnitTests.xml --teamcity --log-junit 
docker exec typo3 php vendor/phpunit/phpunit/phpunit --configuration web/typo3conf/ext/cag_tests/Tests/Build/UnitTestsDeprecated.xml --teamcity --log-junit 
docker exec typo3 php vendor/phpunit/phpunit/phpunit --configuration web/typo3conf/ext/cag_tests/Tests/Build/FunctionalTests.xml --teamcity --log-junit 
docker exec typo3 mkdir -p web/typo3temp/var/tests
docker exec typo3 vendor/bin/chromedriver --url-base=/wd/hub >/dev/null 2>&1 &
docker exec typo3 php -S 0.0.0.0:8000 >/dev/null 2>&1 &
docker exec typo3 sleep 3;
docker exec typo3 typo3DatabaseName='typo3' typo3DatabaseHost='DB' typo3DatabaseUsername='root' typo3DatabasePassword='my-secret-pw' vendor/codeception/codeception/codecept run Acceptance -c web/typo3conf/ext/cag_tests/Tests/Build/AcceptanceTests.yml

docker stop typo3
docker stop db

by changing "my-secret-pw" you change the passwords of the systems

install typo3 via cli

       docker exec typo3 bash /var/www/cgi-bin/run-typo3.sh

⁠Documentation

more about the base images an be found on the docker hub:

https://hub.docker.com/r/webtp3/docker⁠

https://github.com/webtp3/docker⁠

The System runs with a php fastcgi wrapper. So you can easyly swap php Versions to tests on several ons.

docker exec typo3 rm /etc/alternatives/php
docker exec typo3 ln -s /usr/bin/php7.1 /etc/alternatives/php

# alternatives
php -> /etc/alternatives/php (7.0)
php-cgi -> /etc/alternatives/php-cgi
php-cgi7.1
php7.1
php7.2

Web Server https://hub.docker.com/_/ubuntu/⁠

Database Server https://hub.docker.com/_/mysql/⁠

Tag summary

Content type

Image

Digest

Size

238.9 MB

Last updated

about 8 years ago

docker pull webtp3/typo3