diff --git a/CHANGELOG.md b/CHANGELOG.md index 18c8ee4..f9da97b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,13 @@ and this project adheres to [Semantic Version](http://semver.org/spec/v2.0.0.htm ### Removed +## [next release 2.1.0] - 21-09-2018 +### Changed + +* Easier install documentation using `dockergento setup` command +* Set all configuration settings inside `config/dockergento` folder +* Change `docker-compose.yml` filename to `docker-compose-sample.yml` as this file needs to be copied and edited per project. + ## [next release 2.0.0] - 13-09-2018 ### Added diff --git a/README.md b/README.md index 74bcb36..d7baac9 100644 --- a/README.md +++ b/README.md @@ -71,68 +71,20 @@ See [dockergento workflow](#workflow) for a better understanding about whole dev ## Installation -1. Copy this docker configuration repository in your project +1. Install [magento2-dockergento-console](https://github.com/ModestCoders/magento2-dockergento-console) - ``` - cd - curl -L https://api.github.com/repos/ModestCoders/magento2-dockergento/tarball | tar xz --strip=1 - ``` +2. Setup docker in your project: + + ``` + cd + dockergento setup + ``` -2. Edit binded paths or nginx configuration if needed +3. [Optional] If you have a multi-store magento, you need to add your website codes to the ngnix configuration as follows:
- More info about custom configurations - - **Binded Paths:** - - If you install magento code in a different folder than your project root, you might need to replace `` on the following files: - - * `docker-compose.yml` - - ``` - app-volumes: - build: ./config/docker/image/app-volumes - volumes: &appvolumes - - ~/.composer:/var/www/.composer:delegated - - sockdata:/sock - - magento:/var/www/html/ - - ./app:/var/www/html//app:delegated - - ./.git:/var/www/html/.git:delegated - - ./config:/var/www/html/config:delegated - - ./composer.json:/var/www/html/composer.json:delegated - - ./composer.lock:/var/www/html/composer.lock:delegated - # Add here the rest of files and folders in your git repository that you want to bind between host and container - - unison: - image: modestcoders/unison:2.51.2 - volumes: - - magento:/var/www/html/ - - .//vendor:/sync//vendor - environment: - - SYNC_SOURCE_BASE_PATH=/sync/ - - SYNC_DESTINATION_BASE_PATH=/var/www/html/ - - SYNC_MAX_INOTIFY_WATCHES=60000 - ``` - - * `config/docker/image/app-volumes/Dockerfile` - - ``` - RUN mkdir -p /var/www/html/ && chown -R 1000:1000 /var/www/html - ``` - - * `config/docker/image/nginx/conf/default.conf` - - ``` - server { - # ... - set $MAGE_ROOT /var/www/html/; - # ... - ``` - - **Nginx Multi-store:** - - If you have a multi-store magento, you need to add your website codes to the ngnix configuration as follows: - + Open info about ngnix configuration + * `config/docker/image/nginx/conf/default.conf` ``` @@ -148,8 +100,6 @@ See [dockergento workflow](#workflow) for a better understanding about whole dev ```
-3. Install [magento2-dockergento-console](https://github.com/ModestCoders/magento2-dockergento-console) - ## Usage ### Start Application diff --git a/config/grumphp/hooks/docker/commit-msg b/config/dockergento/grumphp/hooks/commit-msg similarity index 100% rename from config/grumphp/hooks/docker/commit-msg rename to config/dockergento/grumphp/hooks/commit-msg diff --git a/config/grumphp/hooks/docker/pre-commit b/config/dockergento/grumphp/hooks/pre-commit similarity index 100% rename from config/grumphp/hooks/docker/pre-commit rename to config/dockergento/grumphp/hooks/pre-commit diff --git a/config/docker/image/app-volumes/Dockerfile b/config/dockergento/image/app-volumes/Dockerfile similarity index 100% rename from config/docker/image/app-volumes/Dockerfile rename to config/dockergento/image/app-volumes/Dockerfile diff --git a/config/docker/image/nginx/Dockerfile b/config/dockergento/image/nginx/Dockerfile similarity index 100% rename from config/docker/image/nginx/Dockerfile rename to config/dockergento/image/nginx/Dockerfile diff --git a/config/docker/image/nginx/conf/default.conf b/config/dockergento/image/nginx/conf/default.conf similarity index 100% rename from config/docker/image/nginx/conf/default.conf rename to config/dockergento/image/nginx/conf/default.conf diff --git a/docker-compose.yml b/docker-compose.sample.yml similarity index 83% rename from docker-compose.yml rename to docker-compose.sample.yml index 9ebeaeb..0012f05 100644 --- a/docker-compose.yml +++ b/docker-compose.sample.yml @@ -2,20 +2,20 @@ version: "3" services: app-volumes: - build: ./config/docker/image/app-volumes + build: ./config/dockergento/image/app-volumes volumes: &appvolumes - ~/.composer:/var/www/.composer:delegated - sockdata:/sock - - magento:/var/www/html + - workspace:/var/www/html - ./app:/var/www/html/app:delegated - ./.git:/var/www/html/.git:delegated - ./config:/var/www/html/config:delegated - ./composer.json:/var/www/html/composer.json:delegated - ./composer.lock:/var/www/html/composer.lock:delegated - # Add here the rest of files and folders in your git repository that you want to bind between host and container + # {FILES_IN_GIT} app: - build: ./config/docker/image/nginx + build: ./config/dockergento/image/nginx ports: - 80:8000 volumes: *appvolumes @@ -52,7 +52,7 @@ services: unison: image: modestcoders/unison:2.51.2 volumes: - - magento:/var/www/html + - workspace:/var/www/html - ./vendor:/sync/vendor environment: - SYNC_SOURCE_BASE_PATH=/sync @@ -65,4 +65,4 @@ services: volumes: dbdata: sockdata: - magento: + workspace: diff --git a/docs/grumphp_setup.md b/docs/grumphp_setup.md index 1f0e37a..4caa334 100644 --- a/docs/grumphp_setup.md +++ b/docs/grumphp_setup.md @@ -4,13 +4,13 @@ If you want to use `grumphp` in your `git hooks`, the `grumphp` commands need to This project provides 2 custom `git hook` templates for that: -* [See config/grumphp/hooks/docker](../config/grumphp/hooks/docker) +* [See config/dockergento/grumphp/hooks](../config/dockergento/grumphp/hooks) Use these custom template by adding this in your `composer.json`: ``` "scripts": { - "grumphpTemplates": "cp -Rf config/grumphp/hooks/docker/* vendor/phpro/grumphp/resources/hooks/local/", + "grumphpTemplates": "cp -Rf config/dockergento/grumphp/hooks/* vendor/phpro/grumphp/resources/hooks/local/", "pre-autoload-dump": [ "cp vendor/magento/magento2-base/app/etc/NonComposerComponentRegistration.php app/etc/NonComposerComponentRegistration.php" ],