A Symfony 4 command to display the most frequent words and their occurence using limit.
- Docker CE for Windows, Docker CE for Linux or Docker CE for MAC installed
- Docker Compose installed
Install and start the Docker stack.
The docker stack is composed by 2 containers : php7 (latest) and nginx. All the configuration is done.
Using Docker CE :
docker-compose build
then
docker-compose up -d
You only need this command. It will start the containers (php7, nginx).
Set www-data user and group as owner of the files inside the project. Connect to the php container with the root user using this command
docker-composer exec php bash
When you are in the bash run
chown -R www-data:www-data .
Exit from the bash
exit
Connect to the php container with the www-data user:
docker-compose exec -u www-data php composer install
Connect to the php container with the www-data user:
docker-compose exec -u www-data php bin/console app:consume-file flatland.txt 100
We actually use a file located at the root folder of this application but you can use any url targeting a file.
- Unit tests
Just run
./bin/phpunit tests/Unit
- All tests
Just run
./bin/phpunit