This is a demo PHP Symfony application used to show an example of what we can do with Docker and docker-compose.
- Copy .env.example to .env
- Open a terminal window
- Change to the project directory:
cd /Users/user/PhpstormProjects/docker-compose-demo
- Start the application:
docker-compose up
- Start a new console session inside the application's container:
docker exec -it dockercomposedemo_demo-fpm_1 bash
- Install composer dependencies:
composer install
When asked to provide parameters, pressing enter to leave the defaults should be fine. - Create the database:
app/console doctrine:database:create
- Create tables in the database
app/console doctrine:schema:create
- In your browser, visit
http://localhost:1234/app_dev.php
- Make sure the selenium services are started. You'll have to run docker-compose like this:
docker-compose -f docker-compose.yml -f Docker/docker-compose-selenium.yml up
- Start a new console session inside the application's container (if not already done):
docker exec -it dockercomposedemo_demo-fpm_1 bash
- Run:
bin/behat
If you want to see the test browser window, use a VNC client to connect to:
Host: localhost
Port: 1235
Password: secret
To pause and step through the tests, use:
bin/behat --step-through