DownloadDocker
Development environment has:
-
/app - application container
Installation
To prepare developing environment please choose one of the installation way replacing placeholder:
-
`{my-docker-account}` Docker Hub account
-
`{project-path}` project path
Pre installation
Before start please be sure that was installed:
-
Docker
-
Optional, create account in Docker Hub
Installation with building own Docker image
-
Build image by running command from CacheManager root directory, `sudo docker build -t {my-docker-account}/cachemanager -f dev/docker/app/Dockerfile .`
-
Check images `sudo docker images`
-
Run container `sudo docker run -d -p 2222:22 -v ~/{project-path}/CacheManager:/CacheManager -t {my-docker-account}/cachemanager`
-
Check container by executing command `sudo docker ps`
Installation using prepared Docker image
-
Run command `sudo docker login`
-
Run command `sudo docker pull picamator/cachemanager`
-
Check images `sudo docker images`
-
Run container `sudo docker run -d -p 2222:22 -v ~/{project-path}/CacheManager:/CacheManager -t picamator/cachemanager`
-
Check container by executing command `sudo docker ps`
SSH
Please use credentials bellow to connect to container via ssh:
-
user: `root`
-
password: `screencast`
-
ip: 0.0.0.0
-
port: 2222
To make connection via console simple run ssh root@0.0.0.0 -p 2222 .
Configuration IDE (PhpStorm)
----------------------------
Remote interpreter
-
Use ssh connection to set php interpreter
-
Set "Path mappings": <progect root>->/CacheManager
More information is here.
UnitTests
-
Configure UnitTest using remote interpreter.
-
Choose "Use Composer autoload"
-
Set "Path to script": /CacheManager/vendor/autoload.php
-
Set "Default configuration file": /CacheManager/dev/tests/unit/phpunit.xml.dist
More information is here.
IDE style configuration
Please install EditorConfig plugin to import editor's configuration.
|