PHP Classes

File: bin/docker/README.md

Recommend this page to a friend!
  Classes of Sergii Pryz   Object Manager Factory   bin/docker/README.md   Download  
File: bin/docker/README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Object Manager Factory
Factory to create objects by name using reflection
Author: By
Last change:
Date: 7 years ago
Size: 2,116 bytes
 

Contents

Class file image Download

Docker

Development environment has:

Pre installation

Before start please be sure that was installed:

  1. Docker
  2. Compose

Installation

  1. Set environment variable `HOST_IP` with your host machine IP, e.g. `export host_ip=192.168.0.104`
  2. Run in application root `sudo docker-compose -f bin/docker/docker-compose.yml up`
  3. Check containers `sudo docker-compose ps`

Containers

object-manager-php

SSH

SSH credentials:

  1. user: `root`
  2. password: `screencast`
  3. ip: 0.0.0.0
  4. port: 2240

To make connection via console simple run ssh root@0.0.0.0 -p 2240.

Usefull commands

  • go to shell inside container `sudo docker-compose -f ./bin/docker/docker-compose.yml exec object-manager-php bash`
  • build container `sudo docker-compose -f ./bin/docker/docker-compose.yml build object-manager-php`
  • build container without caching `sudo docker-compose -f ./bin/docker/docker-compose.yml build --no-cache object-manager-php`

For more information please visit Docker Compose Command-line Reference.

Configuration IDE (PhpStorm) ----------------------------

Remote interpreter

  1. Use ssh connection to set php interpreter
  2. PHP executable `/usr/local/bin/php`
  3. Set "Path mappings": `host machine project root->/ObjectManager`

More information is here.

UnitTests

  1. Configure UnitTest using remote interpreter.
  2. Choose "Use Composer autoload"
  3. Set "Path to script": `/ObjectManager/vendor/autoload.php`
  4. Set "Default configuration file": `/ObjectManager/tests/phpunit.xml.dist`

More information is here.