Sign inSign up

webtp3/docker

By webtp3

•Updated about 8 years ago

this image is part of the tp3_installer for testing typo3 automated and continuously

Image
0

929

webtp3/docker repository overview

⁠webtp3/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 --rm -it -v $PWD:/build --link db:db -e DB_PASS="my-secret-pw" -p 80:80 --name typo3 webtp3/docker:16.4-stable

to have a bash simply add bash to the end of the command (as you can run any command in the docker image) "docker run -d --rm -it -v $PWD:/build --link db:db -e DB_PASS="my-secret-pw" -p 80:80 --name typo3 webtp3/docker:8-stable bash"

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/
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: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.

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

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

what is [tp3] https://web.tp3.de⁠

Tag summary

Content type

Image

Digest

Size

246.3 MB

Last updated

about 8 years ago

docker pull webtp3/docker