Mailer project on base Nano Ninja Docker Boilerplate
Use Docker commands
Run
docker-compose up -d
Stop
docker-compose down -v
Composer install
docker run --rm -v $(pwd)/web:/app composer install
Create the database & tables
docker-compose exec php php ./bin/console doctrine:database:create
docker-compose exec php php ./bin/console doctrine:migrations:migrate
docker-compose exec php php ./bin/console doctrine:fixtures:load
Cache clear
docker-compose exec php php ./bin/console cache:clear
Cache warm
docker-compose exec php php ./bin/console cache:warmup
PDO
Connecting MySQL from<?php
try {
$dsn = 'mysql:host=mysql;dbname=test;charset=utf8;port=3306';
$pdo = new PDO($dsn, 'dev', 'dev');
} catch (PDOException $e) {
echo $e->getMessage();
}
?>
XDebug
For a better integration of Docker to PHPStorm, use the documentation.
Other commands
All other commands and features at Nano Ninja github