- Docker (php + nginx + postgres + adminer + sphinxsearch)
- Codeception
- XDebug
- Implementation docs
https://docs.docker.com/install/
$ sudo groupadd docker
$ sudo usermod -aG docker $USER
https://docs.docker.com/compose/install/
https://github.com/iamluc/docker-hostmanager
run docker-hostmanager
$ docker run -d --name docker-hostmanager --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v /etc/hosts:/hosts iamluc/docker-hostmanager
create .env file from .env.dist file and set correct vars values in it
set alias 10.254.254.254 to 127.0.0.1 network interface
$ sudo ifconfig lo:0 10.254.254.254 up
$ docker-compose up -d --build
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 composer install
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 bin/console doctrine:schema:create
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 bin/console doctrine:migrations:migrate
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 bin/console doctrine:fixtures:load
"http://site.symfony_4_sphinx_search_local/" - website
"http://adminer.symfony_4_sphinx_search_local:8080/" - adminer
Adminer credentials:
System: PostgreSQL
Server: postgres
Username: symfony
Password: 123456
index(reindex) data
$ docker exec -it --user 1000 symfony_4_sphinx_search_sphinxsearch_1 indexer --all --rotate --config /etc/sphinxsearch/sphinx.conf
run all tests under folder
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 bash
$ cd codeception
$ php ../vendor/bin/codecept run tests/Functional
run one test in debug mode
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 bash
$ cd codeception
$ php ../vendor/bin/codecept run tests/Functional/SearchCest.php --debug
build tester classes
$ docker exec -it --user 1000 symfony_4_sphinx_search_php_1 bash
$ cd codeception
$ php ../vendor/bin/codecept build