Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
70 changes: 10 additions & 60 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <path_to_your_project>
curl -L https://api.github.com/repos/ModestCoders/magento2-dockergento/tarball | tar xz --strip=1
```
2. Setup docker in your project:

```
cd <path_to_your_project>
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:

<details>
<summary>More info about custom configurations</summary>

**Binded Paths:**

If you install magento code in a different folder than your project root, you might need to replace `<magento_dir>` 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/<magento_dir>
- ./app:/var/www/html/<magento_dir>/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/<magento_dir>
- ./<magento_dir>/vendor:/sync/<magento_dir>/vendor
environment:
- SYNC_SOURCE_BASE_PATH=/sync/<magento_dir>
- SYNC_DESTINATION_BASE_PATH=/var/www/html/<magento_dir>
- SYNC_MAX_INOTIFY_WATCHES=60000
```

* `config/docker/image/app-volumes/Dockerfile`

```
RUN mkdir -p /var/www/html/<magento_dir> && chown -R 1000:1000 /var/www/html
```

* `config/docker/image/nginx/conf/default.conf`

```
server {
# ...
set $MAGE_ROOT /var/www/html/<magento_dir>;
# ...
```

**Nginx Multi-store:**

If you have a multi-store magento, you need to add your website codes to the ngnix configuration as follows:

<summary>Open info about ngnix configuration</summary>

* `config/docker/image/nginx/conf/default.conf`

```
Expand All @@ -148,8 +100,6 @@ See [dockergento workflow](#workflow) for a better understanding about whole dev
```
</details>

3. Install [magento2-dockergento-console](https://github.com/ModestCoders/magento2-dockergento-console)

## Usage

### Start Application
Expand Down
12 changes: 6 additions & 6 deletions docker-compose.yml → docker-compose.sample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -65,4 +65,4 @@ services:
volumes:
dbdata:
sockdata:
magento:
workspace:
4 changes: 2 additions & 2 deletions docs/grumphp_setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
],
Expand Down