How to run Acceptance tests in a Docker container?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
21 views
There is such
docker-compose.yml
version: '2' services: nginx: build: context: ./ dockerfile: docker/nginx.docker volumes: - ./:/var/www - ./docker/nginx/ssl:/etc/nginx/ssl ports: - "8080:80" links: - php-fpm php-fpm: build: context: ./ dockerfile: docker/php-fpm.docker volumes: - ./:/var/www links: - mysql environment: - "DB_PORT=3306" - "DB_HOST=mysql" php-cli: build: context: ./ dockerfile: docker/php-cli.docker volumes: - ./:/var/www links: - mysql environment: - "DB_PORT=3306" - "DB_HOST=mysql" tty: true mysql: image: mysql:5.7 volumes: - ./docker/mysql/my.cnf/etc/mysql/conf.d/my.cnf - ./docker/mysql/rodeo.sql:/docker-entrypoint-initdb.d/init.sql - ./docker/storage/mysql:/var/lib/mysql environment: - "MYSQL_ROOT_PASSWORD=secret" - "MYSQL_USER=app" - "MYSQL_PASSWORD=secret" - "MYSQL_DATABASE=app" ports: - "33061:3306"

by | 21 views

2 Answers

0 like 0 dislike
in a separate terminal window, start the service:
docker-compose exec php-cli php -S localhost:8080
in another window run the tests:
docker-compose exec php-cli vendor/bin/codecept run
by
0 like 0 dislike
To me the best solution to see the separate environments for local run and docker-compose
by
110,608 questions
257,187 answers
0 comments
40,796 users