DownloadDocker
Application environment has several containers:
Pre installation
Before start please be sure that was installed:
-
Docker
-
Compose
Installation
-
Set environment variable `HOST_IP` with your host machine IP, e.g. `export host_ip=192.168.0.104`
-
Run in application root `sudo docker-compose -f dev/docker/docker-compose.yml up`
-
Check containers `sudo docker-compose ps`
Containers
Web
SSH
SSH credentials:
-
user: `root`
-
password: `screencast`
-
ip: 0.0.0.0
-
port: 2225
To make connection by console simple run ssh [email protected] -p 2225.
_Note_: if connection was refused just checkout inside container how is ssh service service ssh status.
In case it's not running execute service ssh start.
Bash
To open console inside web container please run sudo docker-compose -f ./dev/docker/docker-compose.yml exec web bash
Apache
Please configure you host in you host machine:
-
Add line `place-search.dev 0.0.0.0`
-
Open `http://place-search.dev:8080` in your browser
Configuration IDE (PhpStorm)
----------------------------
Remote interpreter
-
Use ssh connection to set php interpreter
-
Set "Path mappings": `host machine project root->/var/www/PlaceSearchApi`
More information is here.
UnitTests
-
Configure UnitTest using remote interpreter.
-
Choose "Use Composer autoload"
-
Set "Path to script": `/var/www/PlaceSearchApi/vendor/autoload.php`
-
Set "Default configuration file": `/var/www/PlaceSearchApi/dev/tests/unit/phpunit.xml.dist`
More information is here.
|