PHP Classes

File: dev/docker/

Recommend this page to a friend!
  Classes of Sergii Pryz  >  PHP Location Based Search API  >  dev/docker/  >  Download  
File: dev/docker/
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Location Based Search API
API server for searching places near a location
Author: By
Last change:
Date: 3 years ago
Size: 1,974 bytes



Class file image Download


Application environment has several containers:

Pre installation

Before start please be sure that was installed:

  1. Docker
  2. Compose


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




SSH credentials:

  1. user: root
  2. password: screencast
  3. ip:
  4. port: 2225

To make connection by console simple run ssh root@ -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.


To open console inside web container please run sudo docker-compose -f ./dev/docker/docker-compose.yml exec web bash


Please configure you host in you host machine:

  1. Add line
  2. Open in your browser

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

Remote interpreter

  1. Use ssh connection to set php interpreter
  2. Set "Path mappings": host machine project root->/var/www/PlaceSearchApi

More information is here.


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

More information is here.