Example
sandboxproject:
image: avatarnewyork/dockerenv-apache:php53
volumes:
- /var/www/sandboxproject/public:/var/www/html
ports:
- "80"
links:
- db # Link any external containers, like your database
environment:
POSTFIX_HOSTNAME: dev_host
POSTFIX_USER: [email protected]
POSTFIX_PWD: somesecretpassword
XDEBUG_CLIENT_IP: 10.2.0.51
Ask your admin for these (different for staging / dev environments)
POSTFIX_HOSTNAME: [hostname]
POSTFIX_USER: [user]
POSTFIX_PWD: [password]
You can check the status of the mail that was sent using loggly. Search for the respective environment and include appropriate date/times:
In your docker [PROJECTNAME].yml file that you created for your project make sure you have the: XDEBUG_CLIENT_IP: 10.2.0.51 <= replace with your desktop IP
Setup XDEBUG on PHPStorm for a Symfony2/Drupal project:
Next we need to configure a server.
Now we need to configure path mappings for our remote server configuration. 6. Check the Use path mappings checkbox 7. For Symfony2 only, you need to map 2 different directories; Drupal projects require only that the web root directory is mapped:
For more information refer to the PHPStorm docs on debugging: https://www.jetbrains.com/phpstorm/help/debugging-with-a-php-web-application-debug-configuration.html
phpunit is a dockerenv wrapper to phprun - You can run phpunit tests by using the dockerenv phpunit wrapper command as follows:
phpunit [-hv] [-t <latest|php55beta|php53|php53beta|php51>] <PROJECT> [FILES]
class TestLogin extends PHPUnit_Extensions_Selenium2TestCase {
public function setUp(){
// Selenium Host - always dev server ip or hostname
$this->setHost('10.2.0.10');
// Selenium Port - this is static and is running in privleged mode (will always be 4444)
$this->setPort(4444);
// Selenium Browser - *currently only supporting chrome
$this->setBrowser('chrome');
// Selenium Test URL - this will be your dev URL - we should come up with a way to make this dynamic
$this->setBrowserUrl('http://patsandbox.dev.avatarnewyork.com');
}
See: https://github.com/avatarnewyork/dockerenv_apache/wiki/phpunit_selenium_example
phprun (composer, etc) available in :latest, php53 - see dockerenv documentationdrush available in :latest, php53 - see dockerenv documentationphpunit available in :latest, php53 - see dockerenv documentationThe container logs provide the following:
In order to veiw logs run:
docker logs [PROJETNAME]_[PROJECTNAME]_1
example:
docker logs patmohawkconnects_patmohawkconnects_1
| Name | :latest (php55) | :php53 | notes |
|---|---|---|---|
| nodejs less | x | x | https://github.com/avatarnewyork/dockerenv_apache/issues/6 |
| composer | x | x | home is /.composer - https://getcomposer.org/ |
| grunt js | x | x | http://gruntjs.com/ |
| wp-cli | x | x | http://wp-cli.org/ |
| xdebug | x | x | https://github.com/avatarnewyork/dockerenv_apache/issues/8 |
| x | x | Set environment variables above. See https://github.com/avatarnewyork/dockerenv_apache/issues/10 | |
| oauth | x | x | http://php.net/manual/en/book.oauth.php |
| ssh2 | x | x | http://php.net/manual/en/book.ssh2.php |
Content type
Image
Digest
sha256:b8227888b…
Size
357.4 MB
Last updated
almost 11 years ago
docker pull avatarnewyork/dockerenv-apache