This file will setup Wordpress, MySQL & PHPMyAdmin with a single command. Add the code below to a file called "docker-compose.yaml" and run the command
$ docker-compose up -d
# To Tear Down
$ docker-compose down --volumes
| <?php | |
| $host = 'localhost'; | |
| $user = 'root'; | |
| $password = '123456'; | |
| $dbname = 'pdoposts'; | |
| // Set DSN | |
| $dsn = 'mysql:host='. $host .';dbname='. $dbname; | |
| // Create a PDO instance |