https://github.com/roma-glushko/graphql-ce-docker
🐳A docker environment for contributing into Magento 2 GraphQl project
https://github.com/roma-glushko/graphql-ce-docker
docker engcom graphql magento magento-community magento2
Last synced: 6 months ago
JSON representation
🐳A docker environment for contributing into Magento 2 GraphQl project
- Host: GitHub
- URL: https://github.com/roma-glushko/graphql-ce-docker
- Owner: roma-glushko
- License: mit
- Created: 2018-07-01T21:18:37.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2018-08-22T18:09:23.000Z (about 7 years ago)
- Last Synced: 2025-02-12T11:53:52.267Z (8 months ago)
- Topics: docker, engcom, graphql, magento, magento-community, magento2
- Language: Dockerfile
- Homepage:
- Size: 8.79 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Magento 2 GraphQl Docker Environment
Here is a docker environment for contributing into Magento 2 GraphQl project.
## Preconditions
In order to use this environment the following stack of technologies should be installed:
- Docker for Mac: https://docs.docker.com/docker-for-mac/install/
- PhpStorm IDE## Installation
### Configuring XDebug
It's needed to change your IP in `docker/docker-compose.yml` file:
``
XDEBUG_REMOTE_HOST=192.168.0.104
``192.168.0.104 - should be replaced by your IP given by command:
``
ipconfig getifaddr en0
``### Installing Magento 2 GraphQl repository
Navigate to `src` directory and clone magento/graphql-ce project:
```
cd src
git init
git remote add origin https://github.com/magento/graphql-ce
git fetch && git pull origin 2.3-develop
```### Configuring hosts file
Need to add a new record to hosts file:
``
127.0.0.1 graphql-os.test
``### Building docker environment
Navigate to `docker` directory and use docker-compose to build environment:
```
cd docker
docker-compose up -d
```It can take some time to download all required images and prepare the final environment.
### Install dependencies
Once environment is built, it's possible to connect to `magento_os_graphql_server` server and run composer install:
```
docker exec -it magento_os_graphql_server bash
composer install
```### Install Magento 2
Now it should be possible to connect to `magento_os_graphql_server` via browser and install Magento 2.
URL will be the following:`http://graphql-os.test/`
During installation, it will be required to configure DB connection information. It should be the following:
- DB user: `root`
- DB password: `root`
- DB Name: `db`Basically, we are done on this stage with installing environment.
## Magento 2 GraphQl specific actions
### Install ChromeiQl plugin (optional)
Hopefully, it's very easy to work with GraphQl queries directly from Chrome browser via this extension:
https://chrome.google.com/webstore/detail/chromeiql/fkkiamalmpiidkljmicmjfbieiclmeij
However, this is not required and requests can be sent from any similar client.
### Install ZenHub integration for Github (optional)
The project tasks can be easily managed by ZebHub plugin:
https://chrome.google.com/webstore/detail/zenhub-for-github/ogcgkffhplmphkaahpmffcafajaocjbd
This is optional step and tasks can be viewed in Github, too.
### Enable Developer Mode
In order to enable ability fetching information about possible Query fields, it's needed to switch Magento to
developer mode:```
docker exec -it magento_os_graphql_server bash
./bin/magento deploy:mode:show developer
```## Enable debugging on PhpStorm
TBD
## Rebuild environment
There can be a need to rebuild environment once changes applied:
```docker-compose up -d --force-recreate --build```