diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 00000000..3040c8e8 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,21 @@ +# Change Log +All notable changes to this project will be documented in this file. + +The format is based on [Keep a Changelog](http://keepachangelog.com/) +and this project adheres to [Semantic Versioning](http://semver.org/). + + +## [Unreleased] + +### Added +- Add a phyMyAdmin container + +### Changed +- Update AOE Scheduler to version "^1" +- Reference major versions for SMTP Pro, Lesti FPC, Magento Core, AOE Template hints and Scope Hint + +## [v0.11.0] - 2016-11-09 + +### Changed +- Allow access to the Magento Connect Manager (see issue #29) +- Move the scope hint and qconfig modules to the normal requirements (see pull request #27) diff --git a/README.md b/README.md index 08e0626a..98221a6d 100644 --- a/README.md +++ b/README.md @@ -84,10 +84,16 @@ Once the installation is finished the installer will print the URL and the crede ``` ... -installer_1 | Frontend: http://dockerized-magento.local/ -installer_1 | Backend: http://dockerized-magento.local/admin -installer_1 | - Username: admin -installer_1 | - Password: password123 +installer_1 | phpMyAdmin: http://dockerized-magento.local:8080 +installer_1 | - Username: root +installer_1 | - Password: pw +installer_1 | +installer_1 | Backend: http://dockerized-magento.local/admin +installer_1 | - Username: admin +installer_1 | - Password: password123 +installer_1 | +installer_1 | Frontend: http://dockerized-magento.local/ + ``` [![Animation: Installation and first project start](documentation/installation-and-first-start-animation.gif)](https://s3.amazonaws.com/andreaskoch/dockerized-magento/installation/Dockerized-Magento-Installation-Linux-no-sound.mp4) @@ -123,12 +129,13 @@ You can control the project using the built-in `magento`-script which is basical The dockerized Magento project consists of the following components: - **[docker images](docker-images)** - 1. a [php 5.5](docker-images/php/5.5/Dockerfile) image - 2. a [nginx](docker-images/nginx/Dockerfile) web server image - 3. a [solr](docker-images/solr/Dockerfile) search server - 4. a standard [mysql](https://registry.hub.docker.com/_/mysql/) database server image - 5. multiple instances of the standard [redis](https://registry.hub.docker.com/_/redis/) docker image - 6. and an [installer](docker-images/installer/Dockerfile) image which contains all tools for installing the project from scratch using an [install script](docker-images/installer/bin/install.sh) + 1. a [PHP](docker-images/php/Dockerfile) image + 2. a [Nginx](docker-images/nginx/Dockerfile) web server image + 3. a [Solr](docker-images/solr/Dockerfile) search server + 4. a standard [MySQL](https://hub.docker.com/_/mysql/) database server image + 5. multiple instances of the standard [Redis](https://hub.docker.com/_/redis/) docker image + 6. a standard [phpMyAdmin](https://hub.docker.com/r/phpmyadmin/phpmyadmin/) image that allows you to access the database on port 8080 + 7. and a [Installer](docker-images/installer/Dockerfile) image which contains all tools for installing the project from scratch using an [install script](docker-images/installer/bin/install.sh) - a **[shell script](magento)** for controlling the project: [`./magento `](magento) - a [composer-file](composer.json) for managing the **Magento modules** - and the [docker-compose.yml](docker-compose.yml)-file which connects all components diff --git a/composer.json b/composer.json index 97a21d63..be4e7622 100644 --- a/composer.json +++ b/composer.json @@ -4,18 +4,20 @@ "license": "BSD-3-Clause", "homepage": "https://github.com/andreaskoch/dockerized-magento", "require": { - "aoepeople/aoe_scheduler": "v0.4.3", - "aschroder/smtp_pro": "v2.0.5", - "gordonlesti/lesti_fpc": "1.3.6", + "avstudnitz/scopehint": "^0.6", + "tim-reynolds/magento-qconfig": "1.0", + "aoepeople/aoe_scheduler": "^1", + "aschroder/smtp_pro": "^2", + "gordonlesti/lesti_fpc": "^1", "jeroenvermeulen/solarium": "v1.6.9-beta", - "magento-hackathon/magento-composer-installer": "v2.1.1", - "magento/core": "1.9.1.0-patch1" + "aydin-hassan/magento-core-composer-installer": "*", + "colinmollenhour/modman": "*", + "theseer/autoload": "*", + "magento/core": "^1.9" }, "require-dev": { "aoepeople/aoe_profiler": "v0.3.0", - "aoepeople/aoe_templatehints": "v0.4.1", - "avstudnitz/scopehint": "dev-master#9fd3eb0978fa67b55f5756494569746119f3f2f6", - "tim-reynolds/magento-qconfig": "1.0" + "aoepeople/aoe_templatehints": "^0.4" }, "repositories": [ { diff --git a/docker-images/installer/bin/install.sh b/config/installer/bin/install.sh old mode 100644 new mode 100755 similarity index 92% rename from docker-images/installer/bin/install.sh rename to config/installer/bin/install.sh index 9b83cc81..13f875ea --- a/docker-images/installer/bin/install.sh +++ b/config/installer/bin/install.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -e + ##################################### # Update the Magento Installation # Arguments: @@ -24,10 +26,16 @@ function printLogonInformation() { frontendUrl="$baseUrl/" backendUrl="$baseUrl/admin" - echo "Frontend: $frontendUrl" + echo "" + echo "phpMyAdmin: $baseUrl:8080" + echo " - Username: ${MYSQL_USER}" + echo " - Password: ${MYSQL_PASSWORD}" + echo "" echo "Backend: $backendUrl" echo " - Username: ${ADMIN_USERNAME}" echo " - Password: ${ADMIN_PASSWORD}" + echo "" + echo "Frontend: $frontendUrl" } @@ -56,6 +64,9 @@ function runForever() { done } +# Fix the www-folder permissions +chgrp -R 33 /var/www/html + # Check if the MAGENTO_ROOT direcotry has been specified if [ -z "$MAGENTO_ROOT" ] then @@ -99,11 +110,13 @@ substitute-env-vars.sh /etc /etc/fpc.xml.tmpl echo "Overriding Magento Configuration" cp -v /etc/local.xml /var/www/html/web/app/etc/local.xml cp -v /etc/fpc.xml /var/www/html/web/app/etc/fpc.xml +chgrp -R 33 $MAGENTO_ROOT/app/etc echo "Installing Sample Data: Media" curl -s -L https://raw.githubusercontent.com/Vinai/compressed-magento-sample-data/1.9.1.0/compressed-no-mp3-magento-sample-data-1.9.1.0.tgz | tar xz -C /tmp cp -av /tmp/magento-sample-data-*/* $MAGENTO_ROOT rm -rf /tmp/magento-sample-data-* +chgrp -R 33 $MAGENTO_ROOT echo "Installing Sample Data: Database" magerun --skip-root-check --root-dir="$MAGENTO_ROOT" db:create diff --git a/docker-images/installer/bin/substitute-env-vars.sh b/config/installer/bin/substitute-env-vars.sh similarity index 100% rename from docker-images/installer/bin/substitute-env-vars.sh rename to config/installer/bin/substitute-env-vars.sh diff --git a/docker-images/installer/magento/fpc.xml.tmpl b/config/installer/magento/fpc.xml.tmpl similarity index 100% rename from docker-images/installer/magento/fpc.xml.tmpl rename to config/installer/magento/fpc.xml.tmpl diff --git a/docker-images/installer/magento/local.xml.tmpl b/config/installer/magento/local.xml.tmpl similarity index 100% rename from docker-images/installer/magento/local.xml.tmpl rename to config/installer/magento/local.xml.tmpl diff --git a/docker-images/installer/magerun/n98-magerun.yaml.tmpl b/config/installer/magerun/n98-magerun.yaml.tmpl similarity index 100% rename from docker-images/installer/magerun/n98-magerun.yaml.tmpl rename to config/installer/magerun/n98-magerun.yaml.tmpl diff --git a/docker-images/installer/php/php.ini b/config/installer/php/php.ini similarity index 100% rename from docker-images/installer/php/php.ini rename to config/installer/php/php.ini diff --git a/config/nginx/sites-enabled/default.conf b/config/nginx/sites-enabled/default.conf index acfc6abe..6b967d2a 100644 --- a/config/nginx/sites-enabled/default.conf +++ b/config/nginx/sites-enabled/default.conf @@ -28,7 +28,6 @@ server { location ^~ /pkginfo/ { deny all; } location ^~ /report/config.xml { deny all; } location ^~ /var/ { deny all; } - location ^~ /downloader/ { deny all; } location /var/export/ { deny all; } # Custom Locations diff --git a/docker-compose.yml b/docker-compose.yml index 9b382fce..ce1b1707 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,5 +1,5 @@ installer: - build: docker-images/installer + image: andreaskoch/dockerized-magento-installer environment: DOMAIN: dockerized-magento.local MAGENTO_ROOT: /var/www/html/web @@ -16,12 +16,21 @@ installer: ENCRYPTIONKEY: 731aea833710535779fe8c7c49bc6c4d volumes_from: - nginx + volumes: + - ./config/installer/php/php.ini:/usr/local/etc/php/php.ini + - ./config/installer/magerun/n98-magerun.yaml.tmpl:/etc/n98-magerun.yaml.tmpl + - ./config/installer/magento/local.xml.tmpl:/etc/local.xml.tmpl + - ./config/installer/magento/fpc.xml.tmpl:/etc/fpc.xml.tmpl + - ./config/installer/bin/substitute-env-vars.sh:/bin/substitute-env-vars.sh + - ./config/installer/bin/install.sh:/bin/install.sh links: - "cache:rediscache" - "sessions:redissession" - "fullpagecache:redisfullpagecache" - "solr:solr" - "mysql:mysql" + entrypoint: /bin/install.sh + nginx: image: nginx:latest ports: @@ -40,7 +49,7 @@ nginx: volumes_from: - php php: - build: docker-images/php + image: andreaskoch/dockerized-magento-php links: - "cache:rediscache" - "sessions:redissession" @@ -58,10 +67,19 @@ mysql: volumes: - ./data/mysql:/var/lib/mysql solr: - build: docker-images/solr + image: andreaskoch/dockerized-magento-solr cache: image: redis:latest fullpagecache: image: redis:latest sessions: image: redis:latest +phpmyadmin: + image: phpmyadmin/phpmyadmin + ports: + - "8080:80" + links: + - "mysql:mysql" + environment: + PMA_HOST: "mysql" + PMA_PORT: 3306 diff --git a/docker-images/installer/Dockerfile b/docker-images/installer/Dockerfile index ab1babcb..8fadffd9 100644 --- a/docker-images/installer/Dockerfile +++ b/docker-images/installer/Dockerfile @@ -22,10 +22,6 @@ RUN buildDeps=" \ zip \ && apt-get purge -y --auto-remove -COPY php/php.ini /usr/local/etc/php/php.ini - -ENV INSTALLER_VERSION 1.0.0 - # Install Tools RUN apt-get update && \ apt-get install -y \ @@ -36,31 +32,15 @@ RUN apt-get update && \ zip && \ apt-get purge -y --auto-remove -# Add utility scripts -COPY bin/substitute-env-vars.sh /bin/substitute-env-vars.sh -RUN chmod +x /bin/substitute-env-vars.sh - -# Add the Installer -COPY bin/install.sh /bin/install.sh -RUN chmod +x /bin/install.sh - # Install magerun RUN curl -o magerun https://raw.githubusercontent.com/netz98/n98-magerun/master/n98-magerun.phar && \ chmod +x ./magerun && \ + ./magerun selfupdate && \ cp ./magerun /usr/local/bin/ && \ rm ./magerun && \ apt-get update && \ apt-get install -qy mysql-client && \ apt-get purge -y --auto-remove -# Add a custom magerun configuration -COPY magerun/n98-magerun.yaml.tmpl /etc/n98-magerun.yaml.tmpl - -# Add custom Magento configuration files -COPY magento/local.xml.tmpl /etc/local.xml.tmpl -COPY magento/fpc.xml.tmpl /etc/fpc.xml.tmpl - # Install composer RUN curl -sS https://getcomposer.org/installer | php -- --filename=composer --install-dir=bin - -ENTRYPOINT ["/bin/install.sh"] \ No newline at end of file diff --git a/magento b/magento index ea4fcd89..f982a606 100755 --- a/magento +++ b/magento @@ -134,7 +134,7 @@ enterContainer() { } start() { - $DOCKERCOMPOSE up -d && $DOCKERCOMPOSE logs + $DOCKERCOMPOSE up -d && $DOCKERCOMPOSE logs -f } stop() {