From 0b2a71455043fe99c7c34c5c170c4b3d58af1aca Mon Sep 17 00:00:00 2001 From: tudy Date: Thu, 5 Jul 2018 17:53:13 +0200 Subject: [PATCH 01/63] 16.4-stable --- Dockerfile | 2 -- bitbucket-pipelines.yml | 2 +- docker-compose.yml | 11 +++++++++-- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index e0936e6..5a7326e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,8 +22,6 @@ ADD typo3.php.ini /etc/php/cgi/conf.d/ RUN rm -fr /var/www/html/* VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] - - RUN useradd composeruser RUN su composeruser RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" diff --git a/bitbucket-pipelines.yml b/bitbucket-pipelines.yml index 8c6f936..7d0d9ed 100644 --- a/bitbucket-pipelines.yml +++ b/bitbucket-pipelines.yml @@ -14,7 +14,7 @@ pipelines: # authenticate with the Docker Hub registry - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD # push the new Docker image to the Docker registry - - docker push $IMAGE_NAME + #- docker push $IMAGE_NAME - step: caches: - composer diff --git a/docker-compose.yml b/docker-compose.yml index 279c4f0..84ce66e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -11,7 +11,14 @@ typo3: DB_HOST: "db" DB_PORT: "3306" db: - image: mysql + image: webtp3/tp3sql restart: always environment: - MYSQL_ROOT_PASSWORD: "**ChangeMe**" \ No newline at end of file + MYSQL_ROOT_PASSWORD: my-secret-pw + ports: + - "3306:3306" +adminer: + image: adminer + restart: always + ports: + - 8080:8080 \ No newline at end of file From 8cdeedafdc74e123a3a533de6e9882a1750b6c08 Mon Sep 17 00:00:00 2001 From: tudy Date: Thu, 5 Jul 2018 19:13:31 +0200 Subject: [PATCH 02/63] fix 16.4 for stable --- Dockerfile | 7 +++---- README.md | 4 ++-- docker-compose.yml | 8 ++++---- 3 files changed, 9 insertions(+), 10 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5a7326e..3bff716 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,12 +39,11 @@ ENV DB_USER admin ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password -EXPOSE 80 -CMD ["/bin/bash", "-c", "/run-typo3.sh"] +#CMD ["/bin/bash", "-c", "/run-typo3.sh"] ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json -#ADD composer.json /var/www/html/ -#ADD composer.lock /var/www/html/ +ADD composer.json /var/www/html/ #RUN composer install && cp typo3conf/ext/typo3_console/Scripts/typo3cms . +EXPOSE 80 diff --git a/README.md b/README.md index 47c6d3c..c520f65 100644 --- a/README.md +++ b/README.md @@ -11,11 +11,11 @@ Usage (standalone) This image needs an external MySQL server or linked MySQL container. To create a MySQL container: - docker run -d -e MYSQL_PASS="" --name db -p 3306:3306 mysql:stable + docker run -d -e MYSQL_ROOT_PASSWORD="**ChangeMe**" --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="" -p 80:80 webtp3/docker + docker run -d --link db:db -e DB_PASS="**ChangeMe**" -p 80:80 webtp3/docker Usage (combined) ------------------ diff --git a/docker-compose.yml b/docker-compose.yml index 84ce66e..d890ccf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,20 +3,20 @@ typo3: links: - db ports: - - "80:80" + - 80:80 environment: DB_NAME: typo3 DB_USER: admin - DB_PASS: "**ChangeMe**" + DB_PASS: **ChangeMe** DB_HOST: "db" DB_PORT: "3306" db: image: webtp3/tp3sql restart: always environment: - MYSQL_ROOT_PASSWORD: my-secret-pw + MYSQL_ROOT_PASSWORD: **ChangeMe** ports: - - "3306:3306" + - 3306:3306 adminer: image: adminer restart: always From 4fb04f76cbe100eee1024644344a6f056026bbde Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 09:52:29 +0200 Subject: [PATCH 03/63] fix image reduce commands --- Dockerfile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3bff716..d357ee7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,7 +11,7 @@ RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm #RUN a2enmod actions fastcgi alias -ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf +#ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts @@ -22,14 +22,12 @@ ADD typo3.php.ini /etc/php/cgi/conf.d/ RUN rm -fr /var/www/html/* VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] -RUN useradd composeruser -RUN su composeruser -RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" -RUN php composer-setup.php -RUN php -r "unlink('composer-setup.php');" -RUN chmod 755 composer.phar -#RUN su composeruser php composer.phar install create-project web-tp3/tp3_installer +#RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +#RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +#RUN php composer-setup.php +#RUN php -r "unlink('composer-setup.php');" +#RUN chmod 755 composer.phar +#RUN php composer.phar install create-project web-tp3/tp3_installer # Expose environment variables ENV DB_HOST **LinkMe** @@ -41,9 +39,9 @@ ENV INSTALL_TOOL_PASSWORD password #CMD ["/bin/bash", "-c", "/run-typo3.sh"] -ADD AdditionalConfiguration.php /var/www/html/typo3conf/ - +#ADD AdditionalConfiguration.php /var/www/html/typo3conf/ +RUN service apache2 start # Install dependencies defined in composer.json -ADD composer.json /var/www/html/ +#ADD composer.json /var/www/html/ #RUN composer install && cp typo3conf/ext/typo3_console/Scripts/typo3cms . EXPOSE 80 From 378aea85843d02180a94bb048c4c1818d4f66dd5 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:07:56 +0200 Subject: [PATCH 04/63] IMAGE_NAME=your-docker-hub/your-repo:$BITBUCKET_BRANCH --- Dockerfile | 10 ++++---- composer.json | 64 +++------------------------------------------------ 2 files changed, 9 insertions(+), 65 deletions(-) diff --git a/Dockerfile b/Dockerfile index d357ee7..c4b0ce9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -18,14 +18,16 @@ ADD .php-fcgi-starter /var/www/php-fcgi-scripts # Adjust some php settings ADD typo3.php.ini /etc/php/cgi/conf.d/ +# place run script +ADD run-typo3.sh /var/www/cgi-bin/ RUN rm -fr /var/www/html/* VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] -#RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" -#RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" -#RUN php composer-setup.php -#RUN php -r "unlink('composer-setup.php');" +RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" +RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" +RUN php composer-setup.php +RUN php -r "unlink('composer-setup.php');" #RUN chmod 755 composer.phar #RUN php composer.phar install create-project web-tp3/tp3_installer diff --git a/composer.json b/composer.json index 90bbb28..6f18d31 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,9 @@ { - "name": "web-tp3/tp3_installer", - "description": "testing typo3", + "name": "web-tp3/docker", + "description": "image for testing typo3", "type": "project", "minimum-stability": "dev", - "version": "1.0.0", + "version": "16.4-stable", "license": "GPL-3.0+", "authors": [ @@ -17,63 +17,5 @@ "type": "composer", "url": "https://composer.typo3.org/" } - ], - "require": { - "typo3/cms": "dev-TYPO3_8-7", - "helhum/typo3-console": "^5", - "helhum/dotenv-connector": "^2", - "helhum/config-loader": "^0.8", - "ext-gd": "*", - "ext-fileinfo": "*", - "ext-zlib": "*", - "ext-openssl": "*", - "ext-zip": "*", - "ext-mysqli": "*", - "typo3/cms-cli": "*", - "typo3/class-alias-loader": "*", - "typo3/cms-composer-installers": "*", - "psr/http-message": "~1.0", - "cogpowered/finediff": "~0.3.1", - "guzzlehttp/guzzle": "^6.3.0", - "web-tp3/tp3_installer":"1.0.0" - }, - "require-dev": { - "deployer/deployer": "^6", - "consolidation/robo": "^1", - "codeception/codeception":"*", - "typo3/testing-framework": "8.x-dev", - "friendsofphp/php-cs-fixer": "^2.13@dev", - "se/selenium-server-standalone":"~2.53", - "typo3/cms-styleguide" :"~8.0.8", - "ext-soap": "*", - "phpunit/php-invoker":"^1.1", - "enm1989/chromedriver": "~2.30", - "fiunchinho/phpunit-randomizer": "~3.0.0", - "phpunit/phpunit": "*", - "nimut/testing-framework": "^3.0@dev" - - }, - "autoload": { - "psr-4": { - } - }, - "extra": { - "typo3/cms": { - "cms-package-dir": "{$vendor-dir}/typo3/cms", - "web-dir": "web" - }, - "helhum/typo3-console": { - "install-extension-dummy": false - }, - "helhum/dotenv-connector": { - "cache-dir": "var/cache" - }, - "branch-alias": { - "dev-TYPO3_8-7": "8.x-dev" - } - }, - "non-feature-branches": [ - "TYPO3_.+" ] - } From 4ad835d2fb82590aa21af3df69044ee54d664907 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:09:28 +0200 Subject: [PATCH 05/63] --rm -it -v $PWD:/build --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c520f65..7c53ebc 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ This image needs an external MySQL server or linked MySQL container. To create a To run TYPO3 by linking to the database created above: - docker run -d --link db:db -e DB_PASS="**ChangeMe**" -p 80:80 webtp3/docker + docker run -d --rm -it -v $PWD:/build --link db:db -e DB_PASS="**ChangeMe**" -p 80:80 webtp3/docker:16.4-stable Usage (combined) ------------------ From b0734cfef8028ef1f4f68dec21738787be2a27bc Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:19:42 +0200 Subject: [PATCH 06/63] incl. installing 8.x dev --- Dockerfile | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index c4b0ce9..1221e18 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,19 +17,20 @@ RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www ADD .php-fcgi-starter /var/www/php-fcgi-scripts # Adjust some php settings -ADD typo3.php.ini /etc/php/cgi/conf.d/ +ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ -RUN rm -fr /var/www/html/* -VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] +RUN rm -fr /var/www/html RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" #RUN chmod 755 composer.phar -#RUN php composer.phar install create-project web-tp3/tp3_installer +RUN cd /var/www/ +RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html +VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] # Expose environment variables ENV DB_HOST **LinkMe** @@ -39,7 +40,7 @@ ENV DB_USER admin ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password -#CMD ["/bin/bash", "-c", "/run-typo3.sh"] +CMD ["/bin/bash", "-c", "/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ RUN service apache2 start From 15c1a1f89cf79e05947d5311b2eaee480afcbe9c Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:41:13 +0200 Subject: [PATCH 07/63] cert for cag_tests --- Dockerfile | 16 ++++++++++++---- id_rsa | 27 +++++++++++++++++++++++++++ id_rsa.pub | 1 + 3 files changed, 40 insertions(+), 4 deletions(-) create mode 100644 id_rsa create mode 100644 id_rsa.pub diff --git a/Dockerfile b/Dockerfile index 1221e18..57e859b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,18 +3,25 @@ MAINTAINER Thomas Ruta # Install packages RUN apt-get update && \ - apt-get -yq --force-yes install mysql-client git curl imagemagick apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm + apt-get -yq --force-yes install mysql-client git curl imagemagick apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli \ + php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ + php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ + php7.0-fpm RUN a2enmod suexec rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm -#RUN a2enmod actions fastcgi alias +RUN a2enmod actions fastcgi alias #ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin -ADD .php-fcgi-starter /var/www/php-fcgi-scripts +ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ + +#cert for cag_tests +ADD id_rsa /root/.ssh/ +ADD id_rsa.pub /root/.ssh/ # Adjust some php settings ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ @@ -30,6 +37,7 @@ RUN php -r "unlink('composer-setup.php');" #RUN chmod 755 composer.phar RUN cd /var/www/ RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html + VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] # Expose environment variables @@ -39,11 +47,11 @@ ENV DB_NAME typo3 ENV DB_USER admin ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password +RUN service apache2 start CMD ["/bin/bash", "-c", "/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ -RUN service apache2 start # Install dependencies defined in composer.json #ADD composer.json /var/www/html/ #RUN composer install && cp typo3conf/ext/typo3_console/Scripts/typo3cms . diff --git a/id_rsa b/id_rsa new file mode 100644 index 0000000..7dda614 --- /dev/null +++ b/id_rsa @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEAuhQKpUM9XPnvvWXUEPBdnrF7tVk1mQiWDTTIbhNtJ8EEiJWg +Y/N6INjV+RT4i5u4fLpvLufU/m2+mg4BP6+u/P7P73+vckND83uCWQoFphWAXmMw ++dkZ3gnruY7fQyb1i2XS/oUZ/RVDfF1DWwXVcb0UKXeuNO77bkTwrln5mCp8e6gV +u2+yacqWGWmEoN11U0yhhNOs1vYayFBlC6psyTYNyZAAFZA9l4b7oKHw2UPqbp2b +skXvSowQYx1kNDmSKb3NrUcyP+Gs0W4QIGfyLc6ca3E7ZJUV0+Enxf3p4WZ+0ynJ +K9E1VikXGPHpD9Sy3uvu5fWg/YNCywHfhSFHfwIDAQABAoIBAQC4hy1za/XLYTRE +z1l5HtTIjdtPINONGj2rhP+KYYtq0/fJ9w/ibs5bCo1PAGPmFpviXQPrMQ5A7dYJ +cf/9BxzyWUMdj7MODfSx3XaLE+w8IrB1acpkys3jKlVwY2W2c0knXufZbWczWkXd +a6Ni/asIquf2o2/HoIMIfCdtz148bZlAyQakP5KAbZfSArxyas7ODxtK6uREitFJ +mHib6vnaBVnxQ9llLoU+7lSerPSB0JHAFX1gzUK7YuZTLwQmfaKH0bKaKr3qt/b4 +vKLIQ3FtSBifX63roNEq/ufDvaM351bX76m8YhlpW0j1QHnhF9LozT2JAZeSPCpQ +/kLgX68BAoGBAPexO/JH61VagX+UhTT2itGbOgh2h2N1/rd77EgCgg0ZnWo4A/a7 +/RuQYjx8Q+RCX7j/AciVrvyClTuuYUVH0UCDECtdDdgIa0GEH85dt8RRa8/1sYhB +Cvs/kAOZro/2qNysVRi/QU3+o/wth2ysFeOjMD2xv+47/UOKxKJT5W7/AoGBAMBR +xQA0NFz/JqTxfvZyOvga2vxPlBQH9dEfyWVz8B0k8D8dEkd6z/ohwdQAxbIPZKdZ +/I2TQvNsr+DxtJSJSYQNhltGH4Eayn+b1dTd9wX9yF/M9AxKBkwuGXTdcw/7zWX3 +bUORxkpUzZ/+Lf98RE9xDQ0SiuWO2WE2ojZI5KeBAoGBAMKrtWWySK+ItobC//6k +Vm5vBalpHvd44XzsFMRz1CrfmuzEobjl/wQO8mZ/dAyObhVDtu8jVah4KToCz8hX +rYp6d9bdB+hmlYWkhir3VVsicw27GJDyLeNSDaoGuz/CqOznNOqCRp06KUAluG4c +wgdrVprmfOaMl3ziL7E1JvmZAoGAMdS+G7hrHPGLvM9KG2crul+TAC9KagpJ+j6n +O19YBuUsTt4kf1rmCqS2iU0N7H4qkWYylyhh/5rY04stRBNydgHfH0VDInujnn7t +X/OHbwj74z7CuXBww0pqlCpRBwIyjUoYCJr76wSgJuWAW6OCO6dKP2nfjW1/C75R +N4mZnYECgYEAgoEOcbRn1eF7n63jYWv/cnUeAYjcOzFPwdOZpgjA2BkepVJmGgzL +9wDTd9bWMtyuGnc9OKBZQPd3tfiiREgeTRpmE9h/dBC4w4DbHop69RtVd6qYR7NC +D7yLo+rltHJNfSLzQZIn0JydUKGOB9s7zRrlp/AT1iSq1ckjsvEFCvw= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/id_rsa.pub b/id_rsa.pub new file mode 100644 index 0000000..0ed9865 --- /dev/null +++ b/id_rsa.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6FAqlQz1c+e+9ZdQQ8F2esXu1WTWZCJYNNMhuE20nwQSIlaBj83og2NX5FPiLm7h8um8u59T+bb6aDgE/r678/s/vf69yQ0Pze4JZCgWmFYBeYzD52RneCeu5jt9DJvWLZdL+hRn9FUN8XUNbBdVxvRQpd6407vtuRPCuWfmYKnx7qBW7b7JpypYZaYSg3XVTTKGE06zW9hrIUGULqmzJNg3JkAAVkD2XhvugofDZQ+punZuyRe9KjBBjHWQ0OZIpvc2tRzI/4azRbhAgZ/ItzpxrcTtklRXT4SfF/enhZn7TKckr0TVWKRcY8ekP1LLe6+7l9aD9g0LLAd+FIUd/ root@ubuntu \ No newline at end of file From 6441790c779a37b0e7749dfaf7acbe3646d11383 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:45:38 +0200 Subject: [PATCH 08/63] cert for cag --- Dockerfile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Dockerfile b/Dockerfile index 57e859b..49c12b5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,12 @@ FROM ubuntu:xenial MAINTAINER Thomas Ruta +#prepair Server +#RUN sudo -s +#RUN sudo passwd root +RUN apt-get update && \ + apt-get -yq install ssh openssh-server nano vim-nox + # Install packages RUN apt-get update && \ apt-get -yq --force-yes install mysql-client git curl imagemagick apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli \ @@ -22,6 +28,7 @@ ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ #cert for cag_tests ADD id_rsa /root/.ssh/ ADD id_rsa.pub /root/.ssh/ +RUN eval `ssh-agent` && ssh-add /root/.ssh/id_rsa.pub # Adjust some php settings ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ From c145f334a439967c2266de0ba01fb77c8f5dd765 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:49:18 +0200 Subject: [PATCH 09/63] chmod 600 /root/.ssh/id_rsa --- .idea/Docker.iml | 10 ++++++++++ .idea/deployment.xml | 42 ++++++++++++++++++++++++++++++++++++++++++ .idea/misc.xml | 20 ++++++++++++++++++++ .idea/modules.xml | 8 ++++++++ .idea/vcs.xml | 6 ++++++ Dockerfile | 1 + 6 files changed, 87 insertions(+) create mode 100644 .idea/Docker.iml create mode 100644 .idea/deployment.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/vcs.xml diff --git a/.idea/Docker.iml b/.idea/Docker.iml new file mode 100644 index 0000000..016fdc4 --- /dev/null +++ b/.idea/Docker.iml @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/.idea/deployment.xml b/.idea/deployment.xml new file mode 100644 index 0000000..61173dd --- /dev/null +++ b/.idea/deployment.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..bc76d90 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..d7de407 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 49c12b5..50d6a6b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,6 +28,7 @@ ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ #cert for cag_tests ADD id_rsa /root/.ssh/ ADD id_rsa.pub /root/.ssh/ +RUN chmod 600 /root/.ssh/id_rsa && chmod 644 /root/.ssh/id_rsa.pub RUN eval `ssh-agent` && ssh-add /root/.ssh/id_rsa.pub # Adjust some php settings From f91410b52137de93318a0b89b70d150b04d6bad2 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:50:16 +0200 Subject: [PATCH 10/63] chmod 600 /root/.ssh/id_rsa --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 50d6a6b..c338f8e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -28,7 +28,7 @@ ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ #cert for cag_tests ADD id_rsa /root/.ssh/ ADD id_rsa.pub /root/.ssh/ -RUN chmod 600 /root/.ssh/id_rsa && chmod 644 /root/.ssh/id_rsa.pub +RUN chmod 600 /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa.pub RUN eval `ssh-agent` && ssh-add /root/.ssh/id_rsa.pub # Adjust some php settings From 4250c0f6083b8c7a1fb978fa04da35022247215c Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 10:55:14 +0200 Subject: [PATCH 11/63] ssh-askpass --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c338f8e..4a6ac09 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,7 +29,8 @@ ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ ADD id_rsa /root/.ssh/ ADD id_rsa.pub /root/.ssh/ RUN chmod 600 /root/.ssh/id_rsa && chmod 600 /root/.ssh/id_rsa.pub -RUN eval `ssh-agent` && ssh-add /root/.ssh/id_rsa.pub +RUN eval `ssh-agent` +#&& ssh-add /root/.ssh/id_rsa.pub # Adjust some php settings ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ From 1c0b232f9bacbdefb40cbc7bd3b93fa177c6cf68 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 11:57:59 +0200 Subject: [PATCH 12/63] /var/www/cgi-bin/ --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 4a6ac09..a41ad81 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 start -CMD ["/bin/bash", "-c", "/run-typo3.sh"] +CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json From 4c71d171b7178e15c2ecd389d7fbf75f5112f312 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:00:01 +0200 Subject: [PATCH 13/63] ufw --- Dockerfile | 4 +++- README.md | 14 ++++++++++++-- run-typo3.sh | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index a41ad81..193f086 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Thomas Ruta #RUN sudo -s #RUN sudo passwd root RUN apt-get update && \ - apt-get -yq install ssh openssh-server nano vim-nox + apt-get -yq install ssh openssh-server nano vim-nox ufw # Install packages RUN apt-get update && \ @@ -13,6 +13,8 @@ RUN apt-get update && \ php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm +RUN ufw enable && ufw allow ssh && && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh + RUN a2enmod suexec rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers diff --git a/README.md b/README.md index 7c53ebc..75adcb3 100644 --- a/README.md +++ b/README.md @@ -15,8 +15,18 @@ This image needs an external MySQL server or linked MySQL container. To create a To run TYPO3 by linking to the database created above: - docker run -d --rm -it -v $PWD:/build --link db:db -e DB_PASS="**ChangeMe**" -p 80:80 webtp3/docker:16.4-stable - + docker run -d --rm -it -v $PWD:/build --link db:db -e DB_PASS="**ChangeMe**" -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="**ChangeMe**" -p 80:80 --name typo3 webtp3/docker:8-stable bash" + +Following branches are available: +8-stable (with tyo3 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) + +https://hub.docker.com/r/webtp3/docker + Usage (combined) ------------------ ia docker stack deploy or docker-compose diff --git a/run-typo3.sh b/run-typo3.sh index 2b3151a..b7e2c90 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -75,5 +75,5 @@ fi # Start apache in foreground if no arguments are given if [ $# -eq 0 ] then - /run.sh + service apache2 start fi From f6cfc3b10be461af0f3d58b4fa2686a37ca7be77 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:05:08 +0200 Subject: [PATCH 14/63] && && --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 193f086..7cca559 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,7 +13,8 @@ RUN apt-get update && \ php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm -RUN ufw enable && ufw allow ssh && && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh +RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ + ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh RUN a2enmod suexec rewrite ssl actions include cgi From 1b1f9cb9c9d26e4e5260ace7a52af9bd886954ed Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:11:51 +0200 Subject: [PATCH 15/63] iptables instead of uwf --- Dockerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7cca559..fe8aae8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Thomas Ruta #RUN sudo -s #RUN sudo passwd root RUN apt-get update && \ - apt-get -yq install ssh openssh-server nano vim-nox ufw + apt-get -yq install ssh openssh-server nano vim-nox # Install packages RUN apt-get update && \ @@ -13,9 +13,10 @@ RUN apt-get update && \ php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm -RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ - ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh - +#RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ +# ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh +RUN iptables -F && iptables -P INPUT ACCEPT && iptables -P OUTPUT ACCEPT && iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT +RUN iptables -A INPUT -p tcp --dport 22 -j ACCEPT && iptables -A INPUT -p tcp --dport 80 -j ACCEPT RUN a2enmod suexec rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers From 8afea11fcf52f3ea781e077eafed005a0763dd1c Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:14:30 +0200 Subject: [PATCH 16/63] echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 --- Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Dockerfile b/Dockerfile index fe8aae8..e5efb7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Thomas Ruta #RUN sudo -s #RUN sudo passwd root RUN apt-get update && \ - apt-get -yq install ssh openssh-server nano vim-nox + apt-get -yq install ssh openssh-server nano vim-nox uwf # Install packages RUN apt-get update && \ @@ -13,10 +13,10 @@ RUN apt-get update && \ php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm -#RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ -# ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh -RUN iptables -F && iptables -P INPUT ACCEPT && iptables -P OUTPUT ACCEPT && iptables -A INPUT -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT -RUN iptables -A INPUT -p tcp --dport 22 -j ACCEPT && iptables -A INPUT -p tcp --dport 80 -j ACCEPT + +RUN echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 +RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ + ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh RUN a2enmod suexec rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers From 13095e64a37c34335a2f47821874910b4d20fc75 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:15:11 +0200 Subject: [PATCH 17/63] ufw --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e5efb7b..d81f902 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Thomas Ruta #RUN sudo -s #RUN sudo passwd root RUN apt-get update && \ - apt-get -yq install ssh openssh-server nano vim-nox uwf + apt-get -yq install ssh openssh-server nano vim-nox ufw # Install packages RUN apt-get update && \ From 7c59fcb050afd3889e8b3a6a87e650dcd8728296 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:16:15 +0200 Subject: [PATCH 18/63] hmm --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index d81f902..6381c68 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,7 +14,6 @@ RUN apt-get update && \ php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm -RUN echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh From 75cdd76cffb7594da226e5034d0c3f1504137d19 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:19:37 +0200 Subject: [PATCH 19/63] hmm --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6381c68..63a62ec 100644 --- a/Dockerfile +++ b/Dockerfile @@ -14,8 +14,8 @@ RUN apt-get update && \ php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm -RUN ufw enable && ufw allow ssh && ufw allow dns && ufw allow http && ufw allow https && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ - ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh +#RUN ufw enable && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ +# ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh RUN a2enmod suexec rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers From 33fce71089aac4d2cb86b24e81a7b04c766e797b Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:30:44 +0200 Subject: [PATCH 20/63] php path --- .php-fcgi-starter | 4 ++-- Dockerfile | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.php-fcgi-starter b/.php-fcgi-starter index 0ffefd5..a84ac65 100644 --- a/.php-fcgi-starter +++ b/.php-fcgi-starter @@ -1,5 +1,5 @@ #!/bin/sh -PHPRC="/etc/php/7.1/cgi/" +PHPRC="/etc/php/7.0/cgi/" export PHPRC PHP_DOCUMENT_ROOT="/var/www/html" export PHP_DOCUMENT_ROOT @@ -13,7 +13,7 @@ export TMP=/var/www/tmp export TMPDIR=/var/www/tmp export TEMP=/var/www/tmp exec /usr/bin/php-cgi \ - -d open_basedir="/var/www/html:/usr/share/php5:/usr/share/php:/tmp:/dev/random:/dev/urandom" \ + -d open_basedir="/var/www/html:/usr/share/php5:/usr/share/php:/tmp:/dev/random:/dev/urandom:/var/www/cgi-bin" \ -d upload_tmp_dir=/var/www/tmp \ -d session.save_path=/var/www/tmp \ -d sendmail_path="/usr/sbin/sendmail -t -i -f webmaster@tp3.de" \ diff --git a/Dockerfile b/Dockerfile index 63a62ec..e75a909 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm RUN a2enmod actions fastcgi alias -#ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf +ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ From 043ba80263732fb02b693cfbdd7ee2dd6bd4b9c7 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:46:08 +0200 Subject: [PATCH 21/63] php path --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index e75a909..1b091e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 start -CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json From ba3a7503dc2905d8653b13ec3b652b302c80c4a4 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:47:06 +0200 Subject: [PATCH 22/63] apache and ssh --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 1b091e1..df0d586 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,7 @@ RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm RUN a2enmod actions fastcgi alias -ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf +#ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ @@ -68,3 +68,4 @@ RUN service apache2 start #ADD composer.json /var/www/html/ #RUN composer install && cp typo3conf/ext/typo3_console/Scripts/typo3cms . EXPOSE 80 +EXPOSE 22 \ No newline at end of file From a136b7cb9f2cf5d72c1e48d8f9947bf4c16c3754 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:47:28 +0200 Subject: [PATCH 23/63] diable typo for testing --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index df0d586..51458e3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" #RUN chmod 755 composer.phar RUN cd /var/www/ -RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html +#RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] From 34dca0db846a510d44c525c6f22298ee4d9fdb2d Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 13:56:48 +0200 Subject: [PATCH 24/63] suphp duable --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 51458e3..9098fd6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -17,7 +17,7 @@ RUN apt-get update && \ #RUN ufw enable && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ # ufw allow from 0.0.0.0 to 127.0.0.1 port https && ufw allow from 0.0.0.0 to 127.0.0.1 port ssh -RUN a2enmod suexec rewrite ssl actions include cgi +RUN a2enmod rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm From ff23560dde755ec0b8e51848dd91bc7a13053da6 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:03:52 +0200 Subject: [PATCH 25/63] CMD ["/bin/bash"] for debug --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 9098fd6..b0df2d1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ ENV INSTALL_TOOL_PASSWORD password RUN service apache2 start #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] - +CMD ["/bin/bash"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json #ADD composer.json /var/www/html/ From 3076f02ac38af948dca7b7c44097d2ae4f9927b9 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:20:44 +0200 Subject: [PATCH 26/63] show default http --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index b0df2d1..3e6da3b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,7 @@ ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ -RUN rm -fr /var/www/html +#RUN rm -fr /var/www/html RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" From ebdbf5dd04362394004ba53f5a5b2bc9057d9a30 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:25:23 +0200 Subject: [PATCH 27/63] hostname --- Dockerfile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3e6da3b..0636d5b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,7 +39,9 @@ RUN eval `ssh-agent` ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ - +RUN echo localhost.tp3.de > /etc/hostname +RUN hostnamectl set-hostname localhost.tp3.de +RUN hostname && hostname -f #RUN rm -fr /var/www/html RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" From a1b6620dad5e02bca636332330e46f6bde7f9379 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:26:19 +0200 Subject: [PATCH 28/63] hostname --- Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 0636d5b..887c795 100644 --- a/Dockerfile +++ b/Dockerfile @@ -40,7 +40,6 @@ ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ RUN echo localhost.tp3.de > /etc/hostname -RUN hostnamectl set-hostname localhost.tp3.de RUN hostname && hostname -f #RUN rm -fr /var/www/html From e5ee8aa12e24ad176ce97f19288f2ad4c41a5578 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:29:13 +0200 Subject: [PATCH 29/63] hostname --- Dockerfile | 2 -- 1 file changed, 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 887c795..a3cbfce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -39,8 +39,6 @@ RUN eval `ssh-agent` ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ -RUN echo localhost.tp3.de > /etc/hostname -RUN hostname && hostname -f #RUN rm -fr /var/www/html RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" From 12ecf3430625250a675712b33456b1e2cdec4675 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:29:44 +0200 Subject: [PATCH 30/63] hostname --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index a3cbfce..ece22ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,7 +5,7 @@ MAINTAINER Thomas Ruta #RUN sudo -s #RUN sudo passwd root RUN apt-get update && \ - apt-get -yq install ssh openssh-server nano vim-nox ufw + apt-get -yq install ssh openssh-server nano vim-nox # Install packages RUN apt-get update && \ From d62d1e10dc28ce509c59d289ed6fe55505b7b880 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:32:02 +0200 Subject: [PATCH 31/63] remove cmd bash --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ece22ef..c6748f3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ ENV INSTALL_TOOL_PASSWORD password RUN service apache2 start #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] -CMD ["/bin/bash"] + #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json #ADD composer.json /var/www/html/ From b39fd1c4ed3eecf96699cc24f91892a7f7029e89 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:36:27 +0200 Subject: [PATCH 32/63] apache conf --- Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index c6748f3..81374be 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,9 +21,9 @@ RUN a2enmod rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm -RUN a2enmod actions fastcgi alias - -#ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf +RUN a2enmod actions alias +RUN rm /etc/apache2/sites-enabled/000-default.conf -rf +ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ From 2195c7c0027aa5151d4077f3b5240e7c700f1089 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 14:39:05 +0200 Subject: [PATCH 33/63] apache conf --- Dockerfile | 8 ++++---- typo3.conf | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 81374be..1656cc2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,7 +23,6 @@ RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm RUN a2enmod actions alias RUN rm /etc/apache2/sites-enabled/000-default.conf -rf -ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ @@ -40,6 +39,7 @@ ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ #RUN rm -fr /var/www/html +VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin" ,"/var/www/html/error" ] RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" @@ -49,7 +49,7 @@ RUN php -r "unlink('composer-setup.php');" RUN cd /var/www/ #RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html -VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin"] +ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf # Expose environment variables ENV DB_HOST **LinkMe** @@ -58,8 +58,8 @@ ENV DB_NAME typo3 ENV DB_USER admin ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password -RUN service apache2 start - +RUN service apache2 restart +RUN service ssh start #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ diff --git a/typo3.conf b/typo3.conf index 7223e46..095dd0c 100644 --- a/typo3.conf +++ b/typo3.conf @@ -10,7 +10,7 @@ ServerAdmin webmaster@tp3.de - + ServerName localhost.tp3.de ErrorLog /var/log/apache2/error.log @@ -147,7 +147,7 @@ SetHandler None - DavLockDB /var/www/clients/client1/tmp/DavLock + DavLockDB /var/www/tmp/DavLock # DO NOT REMOVE THE COMMENTS! # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE! # WEBDAV BEGIN From d14f3f4b4d0107f6cccb0106dbf2608aac300cb9 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 15:11:33 +0200 Subject: [PATCH 34/63] user typo3 test --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 1656cc2..6448eba 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,7 @@ RUN rm /etc/apache2/sites-enabled/000-default.conf -rf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ +RUN useradd -m -p $6$PuiliFOPUCXV$ZRMim2oiMzecjfw0EtUq3dLEbfyogKRvHze1028pCRV5UKcWMLEF4hi6bQM32eLP.U.P30wCBpib3Hyr5Rdtv1 -s /bin/bash typo3 #cert for cag_tests ADD id_rsa /root/.ssh/ From bf120757e8dc4e86748d912623dbe6c255d1ee36 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 15:19:49 +0200 Subject: [PATCH 35/63] user typo3 test --- Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Dockerfile b/Dockerfile index 6448eba..52a5edb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,6 +27,7 @@ RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ RUN useradd -m -p $6$PuiliFOPUCXV$ZRMim2oiMzecjfw0EtUq3dLEbfyogKRvHze1028pCRV5UKcWMLEF4hi6bQM32eLP.U.P30wCBpib3Hyr5Rdtv1 -s /bin/bash typo3 +RUN echo AllowUsers typo3 >> /etc/ssh/sshd_config #cert for cag_tests ADD id_rsa /root/.ssh/ From 99f796ada7f6809df331794b3020c99b47c9e820 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 15:22:50 +0200 Subject: [PATCH 36/63] user typo3 test --- Dockerfile | 2 +- run-typo3.sh | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 52a5edb..576b899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json diff --git a/run-typo3.sh b/run-typo3.sh index b7e2c90..2113c6e 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -66,7 +66,7 @@ if [ ! -f /var/www/html/typo3conf/LocalConfiguration.php ] --database-create=0 \ --admin-user-name="tp3min" \ --admin-password="Init1111" \ - --site-name="TYPO3 Demo Installation" + --site-name="TYPO3 Tests Installation" echo "Set permissions for /var/www/html folder ..." chown www-data:www-data -R /var/www/html/fileadmin /var/www/html/typo3temp /var/www/html/uploads @@ -76,4 +76,5 @@ fi if [ $# -eq 0 ] then service apache2 start + service ssh start fi From 3d6b0ff723908532eeb4af67f5788780d1d81b9b Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 15:25:24 +0200 Subject: [PATCH 37/63] typo3 test --- Dockerfile | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 576b899..38bc631 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,7 +21,7 @@ RUN a2enmod rewrite ssl actions include cgi RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm -RUN a2enmod actions alias +RUN a2enmod actions fastcgi alias RUN rm /etc/apache2/sites-enabled/000-default.conf -rf RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin @@ -40,17 +40,16 @@ RUN eval `ssh-agent` ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ -#RUN rm -fr /var/www/html -VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin" ,"/var/www/html/error" ] - +RUN chmod 755 /var/www/cgi-bin/ +RUN rm -fr /var/www/html +RUN cd /var/www/ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" -#RUN chmod 755 composer.phar -RUN cd /var/www/ -#RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html +RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html +VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin" ,"/var/www/html/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf # Expose environment variables From 98306ac37dcb3eb08e831d7cc180f0b5a12a9738 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 15:37:21 +0200 Subject: [PATCH 38/63] dont install --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 38bc631..a361b39 100644 --- a/Dockerfile +++ b/Dockerfile @@ -61,7 +61,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json From 21ee1325553465f3aa52752e4013e205af2ec8b0 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 16:03:48 +0200 Subject: [PATCH 39/63] PasswordAuthentication --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index a361b39..92f9235 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,11 +23,12 @@ RUN a2enmod dav_fs dav auth_digest headers #RUN apt-get install php7.0-opcache php-apcu libapache2-mod-fastcgi php7.0-fpm RUN a2enmod actions fastcgi alias RUN rm /etc/apache2/sites-enabled/000-default.conf -rf -RUN mkdir /var/www/html/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin +RUN mkdir /var/www/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi-bin ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ -RUN useradd -m -p $6$PuiliFOPUCXV$ZRMim2oiMzecjfw0EtUq3dLEbfyogKRvHze1028pCRV5UKcWMLEF4hi6bQM32eLP.U.P30wCBpib3Hyr5Rdtv1 -s /bin/bash typo3 -RUN echo AllowUsers typo3 >> /etc/ssh/sshd_config +RUN chmod 755 /var/www/php-fcgi-scripts/.php-fcgi-starter && chown www-data:www-data /var/www/php-fcgi-scripts/.php-fcgi-starter +RUN useradd -m -p test -s /bin/bash typo3 +RUN echo AllowUsers typo3 >> /etc/ssh/sshd_config && sed -i "s/.*PasswordAuthentication .*/PasswordAuthentication yes/g" /etc/ssh/sshd_config #cert for cag_tests ADD id_rsa /root/.ssh/ From 16a3b5c28dbde40cc92074379715ac611b660ace Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 16:09:10 +0200 Subject: [PATCH 40/63] #!/bin/sh --- run-typo3.sh | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/run-typo3.sh b/run-typo3.sh index 2113c6e..ac18ad0 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh DB_HOST=${DB_PORT_3306_TCP_ADDR:-${DB_HOST}} DB_HOST=${DB_1_PORT_3306_TCP_ADDR:-${DB_HOST}} @@ -18,13 +18,14 @@ echo " Database Username: $DB_USER" echo "========================================================================" echo "=> Waiting for database ..." -for ((i=0;i<15;i++)) -do - DB_CONNECTABLE=$(mysql -u$DB_USER -p$DB_PASS -h$DB_HOST -P$DB_PORT -e 'status' >/dev/null 2>&1; echo "$?") - if [[ DB_CONNECTABLE -eq 0 ]]; then - break - fi +i=0 +while [ "$i" -le 15 ]; do + DB_CONNECTABLE=$(mysql -u$DB_USER -p$DB_PASS -h$DB_HOST -P$DB_PORT -e 'status' >/dev/null 2>&1; echo "$?") + if [[ DB_CONNECTABLE -eq 0 ]]; then + break + fi sleep 3 + i=$(( i + 1 )) done if [[ $DB_CONNECTABLE -eq 0 ]]; then From 1d34f93ec0c72f853ed1c65e56f24856cf87f427 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 16:27:54 +0200 Subject: [PATCH 41/63] readme --- Dockerfile | 6 +++--- README.md | 29 ++++++++++++++++++++++++----- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 92f9235..37a8466 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,9 +9,9 @@ RUN apt-get update && \ # Install packages RUN apt-get update && \ - apt-get -yq --force-yes install mysql-client git curl imagemagick apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli \ - php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ - php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ + apt-get -yq --force-yes install mysql-client git curl apache2 apache2-doc apache2-utils libapache2-mod-php php7.0 php7.0-common php7.0-gd php7.0-mysql php7.0-imap php7.0-cli \ + php7.0-cgi libapache2-mod-fcgid apache2-suexec-pristine php-pear php-auth php7.0-mcrypt mcrypt graphicsmagick imagemagick libruby libapache2-mod-python php7.0-curl php7.0-intl php7.0-pspell php7.0-recode \ + php7.0-sqlite3 php7.0-tidy php7.0-xmlrpc php7.0-xsl memcached php-memcache php-imagick php-gettext php7.0-zip php7.0-mbstring php7.0-soap php-xdebug php7.0-json php7.0-opcache php-apcu libapache2-mod-fastcgi \ php7.0-fpm #RUN ufw enable && ufw allow from 0.0.0.0 to 127.0.0.1 port http && \ diff --git a/README.md b/README.md index 75adcb3..849147b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -tp3/docker +webtp3/docker ============================ TYPO3 docker testing image - This image is part of an automated testing enviroment. @@ -25,7 +25,9 @@ Following branches are available: 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) -https://hub.docker.com/r/webtp3/docker + docker cp typo3 /from/ /to/ (Copy files/folders between a container and the local filesystem) + + Usage (combined) ------------------ @@ -36,14 +38,31 @@ ia docker stack deploy or docker-compose 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 -User is "tp3min" and password is "Init1111". +graphicsmagick, imagemagick, letscrypr, openssl, php-xdebug and I think all what you need. -more about the base images an be foun on the docker hub: +Usage (combined) +------------------ + + more about the base images an be found on the docker hub: + +https://hub.docker.com/r/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/ - + From 5b5587f8898290593f360bcefab53f2ae259aaf1 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 16:37:07 +0200 Subject: [PATCH 42/63] ENV DB_HOST --- Dockerfile | 2 +- run-typo3.sh | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile b/Dockerfile index 37a8466..0f80f4b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +#CMD ["/bin/sh", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json diff --git a/run-typo3.sh b/run-typo3.sh index ac18ad0..5c5e774 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -5,9 +5,9 @@ DB_HOST=${DB_1_PORT_3306_TCP_ADDR:-${DB_HOST}} DB_PORT=${DB_PORT_3306_TCP_PORT:-${DB_PORT}} DB_PORT=${DB_1_PORT_3306_TCP_PORT:-${DB_PORT}} -if [ "$DB_PASS" = "**ChangeMe**" ] && [ -n "$DB_1_ENV_MYSQL_PASS" ]; then - DB_PASS="$DB_1_ENV_MYSQL_PASS" -fi +#if [ "$DB_PASS" = "**ChangeMe**" ] && [ -n "$DB_1_ENV_MYSQL_PASS" ]; then +# DB_PASS="$DB_1_ENV_MYSQL_PASS" +#fi echo "=> Using the following MySQL/MariaDB configuration:" echo "========================================================================" From 6846e8466de2b502d12b884081240e7f967f1369 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 16:40:03 +0200 Subject: [PATCH 43/63] run.sh --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 0f80f4b..77a9f3e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,7 +48,7 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" - +RUN cd /var/www/ RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin" ,"/var/www/html/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf @@ -62,7 +62,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -#CMD ["/bin/sh", "-c", "/var/www/cgi-bin/run-typo3.sh"] +CMD ["/bin/sh", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json From 8edafd125a232ea647c25a93a69b4acc27235038 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 16:41:38 +0200 Subject: [PATCH 44/63] vhost --- typo3.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/typo3.conf b/typo3.conf index 095dd0c..5e1a5ff 100644 --- a/typo3.conf +++ b/typo3.conf @@ -6,7 +6,7 @@ - DocumentRoot /var/www/html + DocumentRoot /var/www/html/web/ ServerAdmin webmaster@tp3.de @@ -27,7 +27,7 @@ - + # Clear PHP settings of this website SetHandler None @@ -36,7 +36,7 @@ AllowOverride All Require all granted - + # Clear PHP settings of this website SetHandler None From ff6834430879b2578a4fd2fd42d644352cd1ff46 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 17:20:51 +0200 Subject: [PATCH 45/63] htaccess --- .htaccess | 337 +++++++++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 6 +- 2 files changed, 340 insertions(+), 3 deletions(-) create mode 100644 .htaccess diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..72e9db0 --- /dev/null +++ b/.htaccess @@ -0,0 +1,337 @@ +# ------------------------------------------------------------------------------ +# | CORS-enabled images | +# ------------------------------------------------------------------------------ + + + + SetEnvIf Origin ":" IS_CORS + Header set Access-Control-Allow-Origin "*" env=IS_CORS + + + + + +# ------------------------------------------------------------------------------ +# | Web fonts access | +# ------------------------------------------------------------------------------ + + + Header set Access-Control-Allow-Origin "*" + + + + +# ------------------------------------------------------------------------------ +# | 404 error prevention for non-existing redirected folders | +# ------------------------------------------------------------------------------ +Options -MultiViews + + +# ------------------------------------------------------------------------------ +# | Force IE to render pages in the highest available mode | +# ------------------------------------------------------------------------------ + + Header set X-UA-Compatible "IE=edge" + + Header unset X-UA-Compatible + + + + +# ------------------------------------------------------------------------------ +# | Reducing MIME type security risks | +# ------------------------------------------------------------------------------ + + Header set X-Content-Type-Options "nosniff" + + + +# ------------------------------------------------------------------------------ +# | Proper MIME types for all files | +# ------------------------------------------------------------------------------ + + + # Data interchange + AddType application/atom+xml atom + AddType application/json json map topojson + AddType application/ld+json jsonld + AddType application/rss+xml rss + AddType application/vnd.geo+json geojson + AddType application/xml rdf xml + + # JavaScript + AddType text/javascript js + + # Manifest files + AddType application/manifest+json webmanifest + AddType application/x-web-app-manifest+json webapp + AddType text/cache-manifest appcache + + # Media files + + AddType audio/mp4 f4a f4b m4a + AddType audio/ogg oga ogg opus + AddType image/bmp bmp + AddType image/svg+xml svg svgz + AddType image/webp webp + AddType video/mp4 f4v f4p m4v mp4 + AddType video/ogg ogv + AddType video/webm webm + AddType video/x-flv flv + AddType image/x-icon cur ico + + # Web fonts + AddType application/font-woff woff + AddType application/font-woff2 woff2 + AddType application/vnd.ms-fontobject eot + AddType application/x-font-ttf ttc ttf + AddType font/opentype otf + + # Other + AddType application/octet-stream safariextz + AddType application/x-bb-appworld bbaw + AddType application/x-chrome-extension crx + AddType application/x-opera-extension oex + AddType application/x-xpinstall xpi + AddType text/vcard vcard vcf + AddType text/vnd.rim.location.xloc xloc + AddType text/vtt vtt + AddType text/x-component htc + + + + +# ------------------------------------------------------------------------------ +# | UTF-8 encoding | +# ------------------------------------------------------------------------------ +AddDefaultCharset utf-8 + + AddCharset utf-8 .atom .css .js .json .manifest .rdf .rss .vtt .webapp .webmanifest .xml + + +# In your Apache configuration, you usually use: +SetEnv TYPO3_CONTEXT Development + +# ------------------------------------------------------------------------------ +# | Rewrite engine | +# ------------------------------------------------------------------------------ + + + # Enable URL rewriting + RewriteEngine On + + # Store the current location in an environment variable CWD to use + # mod_rewrite in .htaccess files without knowing the RewriteBase + RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$ + RewriteRule ^.*$ - [E=CWD:%2] + + # Rules to set ApplicationContext based on hostname + RewriteCond %{HTTP_HOST} ^localdev\.tp3\.de$ + RewriteRule .? - [E=TYPO3_CONTEXT:Development] + RewriteCond %{HTTP_HOST} ^staging\.tp3\.de$ + RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging] + #RewriteCond %{HTTP_HOST} ^www\.example\.com$ + #RewriteRule .? - [E=TYPO3_CONTEXT:Production] + + # Rule for versioned static files, configured through: + # - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename'] + # - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename'] + # IMPORTANT: This rule has to be the very first RewriteCond in order to work! + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gzip)$ %{ENV:CWD}$1.$3 [L] + + # Access block for folders + RewriteRule _(?:recycler|temp)_/ - [F] + RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F] + RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F] + RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F] + + # Block access to all hidden files and directories with the exception of + # the visible content from within the `/.well-known/` hidden directory (RFC 5785). + RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC] + RewriteCond %{SCRIPT_FILENAME} -d [OR] + RewriteCond %{SCRIPT_FILENAME} -f + RewriteRule (?:^|/)\. - [F] + + # Stop rewrite processing, if we are in the typo3/ directory or any other known directory + # NOTE: Add your additional local storages here + RewriteRule ^(?:typo3/|fileadmin/|typo3conf/|typo3temp/|uploads/|favicon\.ico) - [L] + + # If the file/symlink/directory does not exist => Redirect to index.php. + # For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'. + RewriteCond %{REQUEST_FILENAME} !-f + RewriteCond %{REQUEST_FILENAME} !-d + RewriteCond %{REQUEST_FILENAME} !-l + RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L] + + + + +# ------------------------------------------------------------------------------ +# | Block access to directories without a default document. | +# ------------------------------------------------------------------------------ + + Options -Indexes + + + +# ------------------------------------------------------------------------------ +# | Block access to hidden files and directories. | +# ------------------------------------------------------------------------------ + + RewriteCond %{SCRIPT_FILENAME} -d [OR] + RewriteCond %{SCRIPT_FILENAME} -f + RewriteRule "(^|/)\." - [F] + + + +# ------------------------------------------------------------------------------ +# | Block access to backup and source files. | +# ------------------------------------------------------------------------------ + + # Apache < 2.3 + + Order allow,deny + Deny from all + Satisfy All + + + # Apache ≥ 2.3 + + Require all denied + + + + +# ------------------------------------------------------------------------------ +# | Block access to vcs directories. | +# ------------------------------------------------------------------------------ + + RedirectMatch 404 /\.(?:git|svn|hg)/ + + + +# ------------------------------------------------------------------------------ +# | Compression | +# ------------------------------------------------------------------------------ + + + + SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding + RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding + + + + # ----------------------------------------------------------------------------------- + # | Compress all output labeled with one of the following media types | + # | (!) For Apache versions above version 2.3.7 you need to enable `mod_filter` | + # | https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype | + # ----------------------------------------------------------------------------------- + AddOutputFilterByType DEFLATE application/atom+xml \ + application/javascript \ + application/json \ + application/ld+json \ + application/manifest+json \ + application/rdf+xml \ + application/rss+xml \ + application/schema+json \ + application/vnd.geo+json \ + application/vnd.ms-fontobject \ + application/x-font-ttf \ + application/x-javascript \ + application/x-web-app-manifest+json \ + application/xhtml+xml \ + application/xml \ + font/eot \ + font/opentype \ + image/bmp \ + image/svg+xml \ + image/vnd.microsoft.icon \ + image/x-icon \ + text/cache-manifest \ + text/css \ + text/html \ + text/javascript \ + text/plain \ + text/vcard \ + text/vnd.rim.location.xloc \ + text/vtt \ + text/x-component \ + text/x-cross-domain-policy \ + text/xml + + + AddEncoding gzip svgz + + + + +# ------------------------------------------------------------------------------ +# | ETag removal | +# ------------------------------------------------------------------------------ + + Header unset ETag + +FileETag None + + +# ------------------------------------------------------------------------------ +# | Expires headers (for better cache control) | +# ------------------------------------------------------------------------------ + + + ExpiresActive on + ExpiresDefault "access plus 1 month" + + ExpiresByType text/css "access plus 1 year" + + ExpiresByType application/json "access plus 0 seconds" + ExpiresByType application/ld+json "access plus 0 seconds" + ExpiresByType application/schema+json "access plus 0 seconds" + ExpiresByType application/vnd.geo+json "access plus 0 seconds" + ExpiresByType application/xml "access plus 0 seconds" + ExpiresByType text/xml "access plus 0 seconds" + + ExpiresByType image/vnd.microsoft.icon "access plus 1 week" + ExpiresByType image/x-icon "access plus 1 week" + + ExpiresByType text/x-component "access plus 1 month" + + ExpiresByType text/html "access plus 0 seconds" + + ExpiresByType application/javascript "access plus 1 year" + ExpiresByType application/x-javascript "access plus 1 year" + ExpiresByType text/javascript "access plus 1 year" + + ExpiresByType application/manifest+json "access plus 1 week" + ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds" + ExpiresByType text/cache-manifest "access plus 0 seconds" + + ExpiresByType audio/ogg "access plus 1 month" + ExpiresByType image/bmp "access plus 1 month" + ExpiresByType image/gif "access plus 1 month" + ExpiresByType image/jpeg "access plus 1 month" + ExpiresByType image/png "access plus 1 month" + ExpiresByType image/svg+xml "access plus 1 month" + ExpiresByType image/webp "access plus 1 month" + ExpiresByType video/mp4 "access plus 1 month" + ExpiresByType video/ogg "access plus 1 month" + ExpiresByType video/webm "access plus 1 month" + + ExpiresByType application/atom+xml "access plus 1 hour" + ExpiresByType application/rdf+xml "access plus 1 hour" + ExpiresByType application/rss+xml "access plus 1 hour" + + ExpiresByType application/vnd.ms-fontobject "access plus 1 month" + ExpiresByType font/eot "access plus 1 month" + ExpiresByType font/opentype "access plus 1 month" + ExpiresByType application/x-font-ttf "access plus 1 month" + ExpiresByType application/font-woff "access plus 1 month" + ExpiresByType application/x-font-woff "access plus 1 month" + ExpiresByType font/woff "access plus 1 month" + ExpiresByType application/font-woff2 "access plus 1 month" + + ExpiresByType text/x-cross-domain-policy "access plus 1 week" + + diff --git a/Dockerfile b/Dockerfile index 77a9f3e..6e305e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,9 +48,9 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" -RUN cd /var/www/ -RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html -VOLUME [ "/var/www/html/uploads", "/var/www/html/fileadmin" ,"/var/www/html/error" ] +RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev ./html +ADD .htaccess /var/www/html/web/ +VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf # Expose environment variables From ec61295c866760081898cededb868670394f08f8 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 17:21:55 +0200 Subject: [PATCH 46/63] /var/www/html/ --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 6e305e2..1a4ad5c 100644 --- a/Dockerfile +++ b/Dockerfile @@ -48,8 +48,8 @@ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" -RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev ./html -ADD .htaccess /var/www/html/web/ +RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev /var/www/html/ +ADD .htaccess .htaccess/web/ VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf From 1062f99a30c4208289b9ba1939d450341a03beb6 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 18:32:45 +0200 Subject: [PATCH 47/63] php /var/www/html --- typo3.conf | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/typo3.conf b/typo3.conf index 5e1a5ff..df0b92d 100644 --- a/typo3.conf +++ b/typo3.conf @@ -50,12 +50,12 @@ PerlModule ModPerl::Registry PerlModule Apache2::Reload - + PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI - + PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI @@ -66,14 +66,14 @@ - + SetHandler mod_python PythonHandler mod_python.publisher PythonDebug On - + SetHandler mod_python @@ -104,7 +104,7 @@ FcgidBusyTimeout 3600 FcgidMaxRequestLen 1073741824 - + SetHandler fcgid-script @@ -116,7 +116,7 @@ AllowOverride All Require all granted - + SetHandler fcgid-script From 68b9c0c22d2ec0610c63b0a17eb1e3c2c59ba8fb Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 19:34:54 +0200 Subject: [PATCH 48/63] mysql access --- Dockerfile | 2 +- docker-compose.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 1a4ad5c..755f5e1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -CMD ["/bin/sh", "-c", "/var/www/cgi-bin/run-typo3.sh"] +CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json diff --git a/docker-compose.yml b/docker-compose.yml index d890ccf..5a75823 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,7 +6,7 @@ typo3: - 80:80 environment: DB_NAME: typo3 - DB_USER: admin + DB_USER: root DB_PASS: **ChangeMe** DB_HOST: "db" DB_PORT: "3306" From 0558811d12ba273e6eca5e2552a70415fc9a7594 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 19:38:09 +0200 Subject: [PATCH 49/63] mysql access --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 755f5e1..3b7cc27 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf ENV DB_HOST **LinkMe** ENV DB_PORT **LinkMe** ENV DB_NAME typo3 -ENV DB_USER admin +ENV DB_USER root ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart From f9e9a232b3f710c2243e039485084d6445588df5 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 19:39:40 +0200 Subject: [PATCH 50/63] run typo3 --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 3b7cc27..ae77916 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,8 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +RUN sh /var/www/cgi-bin/run-typo3.sh +#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json From 513bd322c7e4739b10fc1262d2037675d52865c3 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 19:40:52 +0200 Subject: [PATCH 51/63] run typo3 --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index ae77916..26267d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -62,7 +62,7 @@ ENV DB_PASS **ChangeMe** ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start -RUN sh /var/www/cgi-bin/run-typo3.sh +#RUN sh /var/www/cgi-bin/run-typo3.sh #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] #ADD AdditionalConfiguration.php /var/www/html/typo3conf/ From 5ff5848d58d198394291291a943bb68895150be4 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 19:44:35 +0200 Subject: [PATCH 52/63] doku --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 849147b..2660ca2 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ Mysql Server can also be reached from outside on port 3306 SSH Server also for Rsync and other stuff -graphicsmagick, imagemagick, letscrypr, openssl, php-xdebug and I think all what you need. +graphicsmagick, imagemagick, letscrypt, openssl, php-xdebug and I think all what you need. -Usage (combined) +Documentation ------------------ more about the base images an be found on the docker hub: From 965c8ba5c3ad5c648af42746afb802d221d7a1e2 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 19:45:37 +0200 Subject: [PATCH 53/63] doku --- docker-compose.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5a75823..6061c9e 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,14 +7,14 @@ typo3: environment: DB_NAME: typo3 DB_USER: root - DB_PASS: **ChangeMe** + DB_PASS: "**ChangeMe**" DB_HOST: "db" DB_PORT: "3306" db: image: webtp3/tp3sql restart: always environment: - MYSQL_ROOT_PASSWORD: **ChangeMe** + MYSQL_ROOT_PASSWORD: "**ChangeMe**" ports: - 3306:3306 adminer: From 1600accc4d23c58120d923e85c30059500a335a7 Mon Sep 17 00:00:00 2001 From: tudy Date: Fri, 6 Jul 2018 20:01:26 +0200 Subject: [PATCH 54/63] mysql access --- Dockerfile | 2 +- README.md | 6 +++--- docker-compose.yml | 4 ++-- run-typo3.sh | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 26267d4..ccf6193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -58,7 +58,7 @@ ENV DB_HOST **LinkMe** ENV DB_PORT **LinkMe** ENV DB_NAME typo3 ENV DB_USER root -ENV DB_PASS **ChangeMe** +ENV DB_PASS my-secret-pw ENV INSTALL_TOOL_PASSWORD password RUN service apache2 restart RUN service ssh start diff --git a/README.md b/README.md index 2660ca2..acd3193 100644 --- a/README.md +++ b/README.md @@ -11,14 +11,14 @@ 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="**ChangeMe**" --name db -p 3306:3306 webtp3/tp3sql + 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="**ChangeMe**" -p 80:80 --name typo3 webtp3/docker:16.4-stable + 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="**ChangeMe**" -p 80:80 --name typo3 webtp3/docker:8-stable bash" +"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 tyo3 installed) diff --git a/docker-compose.yml b/docker-compose.yml index 6061c9e..abe79d6 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,14 +7,14 @@ typo3: environment: DB_NAME: typo3 DB_USER: root - DB_PASS: "**ChangeMe**" + DB_PASS: my-secret-pw DB_HOST: "db" DB_PORT: "3306" db: image: webtp3/tp3sql restart: always environment: - MYSQL_ROOT_PASSWORD: "**ChangeMe**" + MYSQL_ROOT_PASSWORD: my-secret-pw ports: - 3306:3306 adminer: diff --git a/run-typo3.sh b/run-typo3.sh index 5c5e774..2e527f8 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -5,7 +5,7 @@ DB_HOST=${DB_1_PORT_3306_TCP_ADDR:-${DB_HOST}} DB_PORT=${DB_PORT_3306_TCP_PORT:-${DB_PORT}} DB_PORT=${DB_1_PORT_3306_TCP_PORT:-${DB_PORT}} -#if [ "$DB_PASS" = "**ChangeMe**" ] && [ -n "$DB_1_ENV_MYSQL_PASS" ]; then +#if [ "$DB_PASS" = "my-secret-pw" ] && [ -n "$DB_1_ENV_MYSQL_PASS" ]; then # DB_PASS="$DB_1_ENV_MYSQL_PASS" #fi From a276f4775ad793bb643948784943e2ae1a9d1e7e Mon Sep 17 00:00:00 2001 From: tudy Date: Mon, 9 Jul 2018 10:29:23 +0200 Subject: [PATCH 55/63] .htaccess path --- .htaccess | 2 ++ Dockerfile | 12 ++++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.htaccess b/.htaccess index 72e9db0..89a205e 100644 --- a/.htaccess +++ b/.htaccess @@ -128,6 +128,8 @@ SetEnv TYPO3_CONTEXT Development # Rules to set ApplicationContext based on hostname RewriteCond %{HTTP_HOST} ^localdev\.tp3\.de$ RewriteRule .? - [E=TYPO3_CONTEXT:Development] + RewriteCond %{HTTP_HOST} ^localhost\.tp3\.de$ + RewriteRule .? - [E=TYPO3_CONTEXT:Development] RewriteCond %{HTTP_HOST} ^staging\.tp3\.de$ RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging] #RewriteCond %{HTTP_HOST} ^www\.example\.com$ diff --git a/Dockerfile b/Dockerfile index ccf6193..1058461 100644 --- a/Dockerfile +++ b/Dockerfile @@ -49,7 +49,7 @@ RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60e RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev /var/www/html/ -ADD .htaccess .htaccess/web/ +ADD .htaccess /var/www/html/web/ VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf @@ -65,9 +65,13 @@ RUN service ssh start #RUN sh /var/www/cgi-bin/run-typo3.sh #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] -#ADD AdditionalConfiguration.php /var/www/html/typo3conf/ +ADD AdditionalConfiguration.php /var/www/html/typo3conf/ # Install dependencies defined in composer.json #ADD composer.json /var/www/html/ -#RUN composer install && cp typo3conf/ext/typo3_console/Scripts/typo3cms . +RUN cp typo3conf/ext/typo3_console/Scripts/typo3cms . +#apache EXPOSE 80 -EXPOSE 22 \ No newline at end of file +#ssh +EXPOSE 22 +#Xdebug +EXPOSE 9000 \ No newline at end of file From 8bce02e00943a73d3ece986604daa977abe6d31e Mon Sep 17 00:00:00 2001 From: tudy Date: Mon, 9 Jul 2018 15:28:00 +0200 Subject: [PATCH 56/63] debug why typo not installs --- .htaccess | 2 +- Dockerfile | 12 ++++++------ docker-compose.yml | 3 +++ 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.htaccess b/.htaccess index 89a205e..e3acfc8 100644 --- a/.htaccess +++ b/.htaccess @@ -128,7 +128,7 @@ SetEnv TYPO3_CONTEXT Development # Rules to set ApplicationContext based on hostname RewriteCond %{HTTP_HOST} ^localdev\.tp3\.de$ RewriteRule .? - [E=TYPO3_CONTEXT:Development] - RewriteCond %{HTTP_HOST} ^localhost\.tp3\.de$ + dRewriteCond %{HTTP_HOST} ^localhost\.tp3\.de$ RewriteRule .? - [E=TYPO3_CONTEXT:Development] RewriteCond %{HTTP_HOST} ^staging\.tp3\.de$ RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging] diff --git a/Dockerfile b/Dockerfile index 1058461..9e89cd3 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,14 +42,14 @@ ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ RUN chmod 755 /var/www/cgi-bin/ -RUN rm -fr /var/www/html +RUN rm -R/var/www/html -rf RUN cd /var/www/ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" -RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev /var/www/html/ -ADD .htaccess /var/www/html/web/ +RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html +#ADD .htaccess /var/www/html/web/ VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf @@ -60,15 +60,15 @@ ENV DB_NAME typo3 ENV DB_USER root ENV DB_PASS my-secret-pw ENV INSTALL_TOOL_PASSWORD password -RUN service apache2 restart +RUN service apache2 start RUN service ssh start #RUN sh /var/www/cgi-bin/run-typo3.sh #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] -ADD AdditionalConfiguration.php /var/www/html/typo3conf/ +ADD AdditionalConfiguration.php /var/www/html/web/typo3conf/ # Install dependencies defined in composer.json #ADD composer.json /var/www/html/ -RUN cp typo3conf/ext/typo3_console/Scripts/typo3cms . +#RUN cp /var/www/html/web/typo3conf/ext/typo3_console/Scripts/typo3cms/* /var/www/html/ #apache EXPOSE 80 #ssh diff --git a/docker-compose.yml b/docker-compose.yml index abe79d6..17b3728 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,8 +17,11 @@ db: MYSQL_ROOT_PASSWORD: my-secret-pw ports: - 3306:3306 + adminer: image: adminer restart: always + links: + - db ports: - 8080:8080 \ No newline at end of file From e80c701a98c27bdd22bf0a38f140c0873d4b065a Mon Sep 17 00:00:00 2001 From: tudy Date: Mon, 9 Jul 2018 15:52:53 +0200 Subject: [PATCH 57/63] move to /var/www/typo3 --- Dockerfile | 11 +++++------ run-typo3.sh | 4 ++-- typo3.conf | 18 +++++++++--------- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9e89cd3..5657d31 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,15 +42,14 @@ ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ RUN chmod 755 /var/www/cgi-bin/ -RUN rm -R/var/www/html -rf RUN cd /var/www/ RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" -RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev html +RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev typo3 #ADD .htaccess /var/www/html/web/ -VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] +VOLUME [ "/var/www/typo3/web/uploads", "/var/www/typo3/web/fileadmin" ,"/var/www/html/web/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf # Expose environment variables @@ -65,10 +64,10 @@ RUN service ssh start #RUN sh /var/www/cgi-bin/run-typo3.sh #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] -ADD AdditionalConfiguration.php /var/www/html/web/typo3conf/ +ADD AdditionalConfiguration.php /var/www/typo3/web/typo3conf/ # Install dependencies defined in composer.json -#ADD composer.json /var/www/html/ -#RUN cp /var/www/html/web/typo3conf/ext/typo3_console/Scripts/typo3cms/* /var/www/html/ +#ADD composer.json /var/www/typo3/ +#RUN cp /var/www/typo3/web/typo3conf/ext/typo3_console/Scripts/typo3cms/* /var/www/typo3/ #apache EXPOSE 80 #ssh diff --git a/run-typo3.sh b/run-typo3.sh index 2e527f8..364fcbd 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -56,7 +56,7 @@ else exit $DB_CONNECTABLE fi -if [ ! -f /var/www/html/typo3conf/LocalConfiguration.php ] +if [ ! -f /var/www/typo3/typo3conf/LocalConfiguration.php ] then php typo3cms install:setup --non-interactive \ --database-user-name="tp3min" \ @@ -70,7 +70,7 @@ if [ ! -f /var/www/html/typo3conf/LocalConfiguration.php ] --site-name="TYPO3 Tests Installation" echo "Set permissions for /var/www/html folder ..." - chown www-data:www-data -R /var/www/html/fileadmin /var/www/html/typo3temp /var/www/html/uploads + chown www-data:www-data -R /var/www/typo3/fileadmin /var/www/typo3/typo3temp /var/www/typo3/uploads fi # Start apache in foreground if no arguments are given diff --git a/typo3.conf b/typo3.conf index df0b92d..79ce0f3 100644 --- a/typo3.conf +++ b/typo3.conf @@ -6,7 +6,7 @@ - DocumentRoot /var/www/html/web/ + DocumentRoot /var/www/typo3/web/ ServerAdmin webmaster@tp3.de @@ -27,7 +27,7 @@ - + # Clear PHP settings of this website SetHandler None @@ -36,7 +36,7 @@ AllowOverride All Require all granted - + # Clear PHP settings of this website SetHandler None @@ -50,12 +50,12 @@ PerlModule ModPerl::Registry PerlModule Apache2::Reload - + PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI - + PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI @@ -66,14 +66,14 @@ - + SetHandler mod_python PythonHandler mod_python.publisher PythonDebug On - + SetHandler mod_python @@ -104,7 +104,7 @@ FcgidBusyTimeout 3600 FcgidMaxRequestLen 1073741824 - + SetHandler fcgid-script @@ -116,7 +116,7 @@ AllowOverride All Require all granted - + SetHandler fcgid-script From 7d67f589dbdce60b8509bdee8d4b60e42d3b1dfe Mon Sep 17 00:00:00 2001 From: tudy Date: Mon, 9 Jul 2018 16:43:31 +0200 Subject: [PATCH 58/63] back to move to /var/www/html --- Dockerfile | 16 ++++++++++------ run-typo3.sh | 4 ++-- typo3.conf | 20 ++++++++++---------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 5657d31..3e23693 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,14 +42,18 @@ ADD typo3.php.ini /etc/php/7.0/cgi/conf.d/ # place run script ADD run-typo3.sh /var/www/cgi-bin/ RUN chmod 755 /var/www/cgi-bin/ -RUN cd /var/www/ + RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" RUN php -r "if (hash_file('SHA384', 'composer-setup.php') === '544e09ee996cdf60ece3804abc52599c22b1f40f4323403c44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" RUN php composer-setup.php RUN php -r "unlink('composer-setup.php');" -RUN php composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev typo3 +RUN cp /composer.phar /var/www/composer.phar + +RUN php /var/www/composer.phar --dev --stability=dev create-project web-tp3/tp3_installer:dev-8.x-dev typo3 +RUN rm -R /var/www/html -rf && mv /typo3 /var/www/html + #ADD .htaccess /var/www/html/web/ -VOLUME [ "/var/www/typo3/web/uploads", "/var/www/typo3/web/fileadmin" ,"/var/www/html/web/error" ] +VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf # Expose environment variables @@ -64,10 +68,10 @@ RUN service ssh start #RUN sh /var/www/cgi-bin/run-typo3.sh #CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] -ADD AdditionalConfiguration.php /var/www/typo3/web/typo3conf/ +ADD AdditionalConfiguration.php /var/www/html/web/typo3conf/ # Install dependencies defined in composer.json -#ADD composer.json /var/www/typo3/ -#RUN cp /var/www/typo3/web/typo3conf/ext/typo3_console/Scripts/typo3cms/* /var/www/typo3/ +#ADD composer.json /var/www/html/ +#RUN cp /var/www/html/web/typo3conf/ext/typo3_console/Scripts/typo3cms/* /var/www/html/ #apache EXPOSE 80 #ssh diff --git a/run-typo3.sh b/run-typo3.sh index 364fcbd..2e527f8 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -56,7 +56,7 @@ else exit $DB_CONNECTABLE fi -if [ ! -f /var/www/typo3/typo3conf/LocalConfiguration.php ] +if [ ! -f /var/www/html/typo3conf/LocalConfiguration.php ] then php typo3cms install:setup --non-interactive \ --database-user-name="tp3min" \ @@ -70,7 +70,7 @@ if [ ! -f /var/www/typo3/typo3conf/LocalConfiguration.php ] --site-name="TYPO3 Tests Installation" echo "Set permissions for /var/www/html folder ..." - chown www-data:www-data -R /var/www/typo3/fileadmin /var/www/typo3/typo3temp /var/www/typo3/uploads + chown www-data:www-data -R /var/www/html/fileadmin /var/www/html/typo3temp /var/www/html/uploads fi # Start apache in foreground if no arguments are given diff --git a/typo3.conf b/typo3.conf index 79ce0f3..2de7c84 100644 --- a/typo3.conf +++ b/typo3.conf @@ -1,12 +1,12 @@ - + AllowOverride None Require all denied - DocumentRoot /var/www/typo3/web/ + DocumentRoot /var/www/html/web/ ServerAdmin webmaster@tp3.de @@ -27,7 +27,7 @@ - + # Clear PHP settings of this website SetHandler None @@ -36,7 +36,7 @@ AllowOverride All Require all granted - + # Clear PHP settings of this website SetHandler None @@ -50,12 +50,12 @@ PerlModule ModPerl::Registry PerlModule Apache2::Reload - + PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI - + PerlResponseHandler ModPerl::Registry PerlOptions +ParseHeaders Options +ExecCGI @@ -66,14 +66,14 @@ - + SetHandler mod_python PythonHandler mod_python.publisher PythonDebug On - + SetHandler mod_python @@ -104,7 +104,7 @@ FcgidBusyTimeout 3600 FcgidMaxRequestLen 1073741824 - + SetHandler fcgid-script @@ -116,7 +116,7 @@ AllowOverride All Require all granted - + SetHandler fcgid-script From 8dff806f34f54e3005be405b07dac1c8d41f34d6 Mon Sep 17 00:00:00 2001 From: tudy Date: Tue, 10 Jul 2018 11:10:29 +0200 Subject: [PATCH 59/63] xdebug settings in ini --- typo3.php.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/typo3.php.ini b/typo3.php.ini index 7cb367a..9101cf9 100644 --- a/typo3.php.ini +++ b/typo3.php.ini @@ -1,4 +1,7 @@ memory_limit = 512M max_execution_time = 240 upload_max_filesize = 200M -post_max_size = 200M \ No newline at end of file +post_max_size = 200M +xdebug.remote_enable = 1 +xdebug.max_nesting_level = 1000 +xdebug.remote_port = 9000 \ No newline at end of file From 3721c19306ee3a93e539896a0b44e2cfda3cd55a Mon Sep 17 00:00:00 2001 From: tudy Date: Tue, 10 Jul 2018 14:44:45 +0200 Subject: [PATCH 60/63] autoinstall env connector file permission link DB container --- .env | 75 +++++++++++++++++++++++++++++++++++++++++++++++++++ Dockerfile | 2 ++ composer.json | 7 ++++- run-typo3.sh | 4 +-- typo3.php.ini | 2 ++ 5 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 .env diff --git a/.env b/.env new file mode 100644 index 0000000..b29868d --- /dev/null +++ b/.env @@ -0,0 +1,75 @@ +################################################## +################## LOCAL CONFIG ################## + + +############################################################## +### config for helhum's TYPO3 dotenv connector / config-loader +## +# + +# host's title ... used in ./getenv.php to get info about environment via http +HOST_TITLE='tp3 docker LocalDev' + +# Use 'Development' to avoid TYPO3 caching and add verbose error output +# Use 'Production' for maximum performance and no error output +TYPO3_CONTEXT='Development' + +# Set arbitrary TYPO3_CONF_VARS values +# ...following the convention: TYPO3__
[__]__property + + +## The ** TYPO3 8 ** way of adding DB credentials +TYPO3__DB__Connections__Default__host='localhost' +TYPO3__DB__Connections__Default__dbname='cag_tests' +TYPO3__DB__Connections__Default__user='root' +TYPO3__DB__Connections__Default__password='my-secret-pw' + + +## DB credentials for TYPO3 <= 7 LTS +#TYPO3__DB__host='localhost' +#TYPO3__DB__port='3306' +#TYPO3__DB__database='t3_myproject' +#TYPO3__DB__username='t3_myproject' +#TYPO3__DB__password='someNicePass' + + +## Site name +TYPO3__SYS__sitename='[add project name here]' + +## Graphicsmagick path +TYPO3__GFX__im_path='/usr/bin/' +TYPO3__GFX__im_path_lzw='/usr/bin/' + + + + +################################################## +################## CONTENT SYNC ################## + +# General Konfiguration +CONTENT_SYNC_HOST='myproject.connectaserver.de' +CONTENT_SYNC_SSH_USER='h.mustermann' +CONTENT_SYNC_SSH_KEY='/Users/hmustermann/.ssh/mustermann_key' + +################## SYNC FILES ################## + +# htdocs directory on remote host +CONTENT_SYNC_FILES_HOST_BASE_PATH='/web/myproject.connectaserver.de/current' + +# if we have a difference between /web/myproject.connectaserver.de/current (webroot) and +# directory of Robo execution, we have to compensate it with the following path correction. +# The path must end with a / +CONTENT_SYNC_FILES_LOCAL_BASE_PATH_CORRECTION='web/' + +# Folders to sync. The path must end with a /. Multiple paths must be seperated with a , +CONTENT_SYNC_FOLDERS='fileadmin/' + +################# SYNC DATABASE ################# + +CONTENT_SYNC_DATABASE_REMOTE_HOST='localhost' +CONTENT_SYNC_DATABASE_REMOTE_DB_USER='t3_myproject_remote' +CONTENT_SYNC_DATABASE_REMOTE_DB_NAME='t3_myproject_remote' +CONTENT_SYNC_DATABASE_REMOTE_DB_PASS='someNicePass' + +################## CONTENT SYNC ################## +################################################## diff --git a/Dockerfile b/Dockerfile index 3e23693..7336b08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,8 @@ RUN rm -R /var/www/html -rf && mv /typo3 /var/www/html #ADD .htaccess /var/www/html/web/ VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] +RUN chown www-data:www-data -R /var/www/html/ && chmod 755 -R /var/www/html/web/ + ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf # Expose environment variables diff --git a/composer.json b/composer.json index 6f18d31..4e94e16 100644 --- a/composer.json +++ b/composer.json @@ -17,5 +17,10 @@ "type": "composer", "url": "https://composer.typo3.org/" } - ] + ], + "extra": { + "helhum/dotenv-connector": { + "env-file": ".env" + } + } } diff --git a/run-typo3.sh b/run-typo3.sh index 2e527f8..55b4b69 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -1,4 +1,4 @@ -#!/bin/sh +#!/bin/bash DB_HOST=${DB_PORT_3306_TCP_ADDR:-${DB_HOST}} DB_HOST=${DB_1_PORT_3306_TCP_ADDR:-${DB_HOST}} @@ -70,7 +70,7 @@ if [ ! -f /var/www/html/typo3conf/LocalConfiguration.php ] --site-name="TYPO3 Tests Installation" echo "Set permissions for /var/www/html folder ..." - chown www-data:www-data -R /var/www/html/fileadmin /var/www/html/typo3temp /var/www/html/uploads + chown www-data:www-data -R /var/www/html/web/fileadmin /var/www/html/web/typo3temp /var/www/html/web/uploads fi # Start apache in foreground if no arguments are given diff --git a/typo3.php.ini b/typo3.php.ini index 9101cf9..7f5da59 100644 --- a/typo3.php.ini +++ b/typo3.php.ini @@ -2,6 +2,8 @@ memory_limit = 512M max_execution_time = 240 upload_max_filesize = 200M post_max_size = 200M +max_input_vars=1500 + xdebug.remote_enable = 1 xdebug.max_nesting_level = 1000 xdebug.remote_port = 9000 \ No newline at end of file From 6eeb36ebb5a3727c75f58dbba4154998afdfac98 Mon Sep 17 00:00:00 2001 From: tudy Date: Tue, 10 Jul 2018 14:49:54 +0200 Subject: [PATCH 61/63] auto install cmd --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 7336b08..ce1cace 100644 --- a/Dockerfile +++ b/Dockerfile @@ -68,7 +68,7 @@ ENV INSTALL_TOOL_PASSWORD password RUN service apache2 start RUN service ssh start #RUN sh /var/www/cgi-bin/run-typo3.sh -#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] ADD AdditionalConfiguration.php /var/www/html/web/typo3conf/ # Install dependencies defined in composer.json From 6e783e33a96ed273814a5ebb81247c2ed4bb7c01 Mon Sep 17 00:00:00 2001 From: tudy Date: Tue, 10 Jul 2018 16:11:30 +0200 Subject: [PATCH 62/63] typo3user ssh adjust rights --- Dockerfile | 14 +++++++------- run-typo3.sh | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index ce1cace..658f1d4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -27,8 +27,8 @@ RUN mkdir /var/www/php-fcgi-scripts && mkdir /var/www/tmp && mkdir /var/www/cgi- ADD .php-fcgi-starter /var/www/php-fcgi-scripts/ RUN chmod 755 /var/www/php-fcgi-scripts/.php-fcgi-starter && chown www-data:www-data /var/www/php-fcgi-scripts/.php-fcgi-starter -RUN useradd -m -p test -s /bin/bash typo3 -RUN echo AllowUsers typo3 >> /etc/ssh/sshd_config && sed -i "s/.*PasswordAuthentication .*/PasswordAuthentication yes/g" /etc/ssh/sshd_config +RUN useradd -m -g www-data -s /bin/bash typo3user +RUN echo AllowUsers typo3user >> /etc/ssh/sshd_config && sed -i "s/.*PasswordAuthentication .*/PasswordAuthentication yes/g" /etc/ssh/sshd_config #cert for cag_tests ADD id_rsa /root/.ssh/ @@ -53,8 +53,8 @@ RUN php /var/www/composer.phar --dev --stability=dev create-project web-tp3/tp3_ RUN rm -R /var/www/html -rf && mv /typo3 /var/www/html #ADD .htaccess /var/www/html/web/ -VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin" ,"/var/www/html/web/error" ] -RUN chown www-data:www-data -R /var/www/html/ && chmod 755 -R /var/www/html/web/ +VOLUME [ "/var/www/html/web/uploads", "/var/www/html/web/fileadmin", "/var/www/html/web/typo3temp" ,"/var/www/html/web/error" ] +RUN chown typo3user:www-data -R /var/www/html/ && chmod 775 -R /var/www/html/web/ ADD typo3.conf /etc/apache2/sites-enabled/000-default.conf @@ -67,10 +67,10 @@ ENV DB_PASS my-secret-pw ENV INSTALL_TOOL_PASSWORD password RUN service apache2 start RUN service ssh start -#RUN sh /var/www/cgi-bin/run-typo3.sh -CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] +RUN bash /var/www/cgi-bin/run-typo3.sh +#CMD ["/bin/bash", "-c", "/var/www/cgi-bin/run-typo3.sh"] -ADD AdditionalConfiguration.php /var/www/html/web/typo3conf/ +#ADD AdditionalConfiguration.php /var/www/html/web/typo3conf/ # Install dependencies defined in composer.json #ADD composer.json /var/www/html/ #RUN cp /var/www/html/web/typo3conf/ext/typo3_console/Scripts/typo3cms/* /var/www/html/ diff --git a/run-typo3.sh b/run-typo3.sh index 55b4b69..6ab9936 100644 --- a/run-typo3.sh +++ b/run-typo3.sh @@ -56,7 +56,7 @@ else exit $DB_CONNECTABLE fi -if [ ! -f /var/www/html/typo3conf/LocalConfiguration.php ] +if [ ! -f /var/www/html/web/typo3conf/LocalConfiguration.php ] then php typo3cms install:setup --non-interactive \ --database-user-name="tp3min" \ From 2f1d42c3d42ea9f8c49711a9f0b8e16fa6a46f48 Mon Sep 17 00:00:00 2001 From: tudy Date: Tue, 10 Jul 2018 22:49:36 +0200 Subject: [PATCH 63/63] additional config to env --- .env | 46 +------------------------- .gitignore | 96 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 97 insertions(+), 45 deletions(-) create mode 100644 .gitignore diff --git a/.env b/.env index b29868d..955297e 100644 --- a/.env +++ b/.env @@ -20,56 +20,12 @@ TYPO3_CONTEXT='Development' ## The ** TYPO3 8 ** way of adding DB credentials TYPO3__DB__Connections__Default__host='localhost' -TYPO3__DB__Connections__Default__dbname='cag_tests' +TYPO3__DB__Connections__Default__dbname='typo3' TYPO3__DB__Connections__Default__user='root' TYPO3__DB__Connections__Default__password='my-secret-pw' -## DB credentials for TYPO3 <= 7 LTS -#TYPO3__DB__host='localhost' -#TYPO3__DB__port='3306' -#TYPO3__DB__database='t3_myproject' -#TYPO3__DB__username='t3_myproject' -#TYPO3__DB__password='someNicePass' - - -## Site name -TYPO3__SYS__sitename='[add project name here]' ## Graphicsmagick path TYPO3__GFX__im_path='/usr/bin/' TYPO3__GFX__im_path_lzw='/usr/bin/' - - - - -################################################## -################## CONTENT SYNC ################## - -# General Konfiguration -CONTENT_SYNC_HOST='myproject.connectaserver.de' -CONTENT_SYNC_SSH_USER='h.mustermann' -CONTENT_SYNC_SSH_KEY='/Users/hmustermann/.ssh/mustermann_key' - -################## SYNC FILES ################## - -# htdocs directory on remote host -CONTENT_SYNC_FILES_HOST_BASE_PATH='/web/myproject.connectaserver.de/current' - -# if we have a difference between /web/myproject.connectaserver.de/current (webroot) and -# directory of Robo execution, we have to compensate it with the following path correction. -# The path must end with a / -CONTENT_SYNC_FILES_LOCAL_BASE_PATH_CORRECTION='web/' - -# Folders to sync. The path must end with a /. Multiple paths must be seperated with a , -CONTENT_SYNC_FOLDERS='fileadmin/' - -################# SYNC DATABASE ################# - -CONTENT_SYNC_DATABASE_REMOTE_HOST='localhost' -CONTENT_SYNC_DATABASE_REMOTE_DB_USER='t3_myproject_remote' -CONTENT_SYNC_DATABASE_REMOTE_DB_NAME='t3_myproject_remote' -CONTENT_SYNC_DATABASE_REMOTE_DB_PASS='someNicePass' - -################## CONTENT SYNC ################## -################################################## diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3506013 --- /dev/null +++ b/.gitignore @@ -0,0 +1,96 @@ +### +# typical build / composer / vendor folders to ignore +# +/vendor +/node_modules +/.build-cache +/_temp/* +!/_temp/.gitkeep +/bin +/typo3cms + + +### +# some typical TYPO3 folders and files to be ignored +# +/web/FIRST_INSTALL +/web/fileadmin +/web/uploads +/web/typo3temp/* +/web/typo3 +/web/typo3_src +/web/index.php + + +### +# composer friendly setup for typo3conf +# +/web/typo3conf/* +!/web/typo3conf/LocalConfiguration.php +!/web/typo3conf/AdditionalConfiguration.php +!/web/typo3conf/PackageStates.php +!/web/typo3conf/realurl_conf.php +!/web/typo3conf/ext +/web/typo3conf/ext/* + +/web/typo3conf/conf.d/* +!/web/typo3conf/conf.d/.gitkeep + +# TODO: think about that! +!/web/typo3conf/l10n + +# own or patched extensions to be included in mhr_www.git +#!/web/typo3conf/ext/tmpl +#!/web/typo3conf/ext/someotherhotext + + + +### +# ignore some files for .env environment configuration handling +# +/.env +/var/log/* +!/var/log/.gitkeep +/var/cache/* +!/var/cache/.gitkeep +/var/storage/* +!/var/storage/.gitkeep + + + + + + + + +### +# Ignoring temporary files (left by e.g. vim) +# Ignoring by common IDE's used directories/files +# +*~ +*.bak +*.idea +*.project +*.swp +.buildpath +.cache +.project +.session +.settings +.TemporaryItems +.webprj +nbproject +.nbproject +.DS_Store +.DS_Store? +._* +.Spotlight-V100 +.Trashes +ehthumbs.db +Thumbs.db +.htpasswd +.sass-cache +.tmproj +*.sublime-project +*.sublime-workspace; +.env