Answer the question
In order to leave comments, you need to log in
How to run Acceptance tests in Docker container?
There is such
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"
actor: AcceptanceTester
modules:
enabled:
- PhpBrowser:
url: http://localhost:8080
- \Helper\Acceptance
docker-compose exec php-cli vendor/bin/codecept run
Answer the question
In order to leave comments, you need to log in
run the service in a separate terminal window:
docker-compose exec php-cli php -S localhost:8080
run tests in another window:
docker-compose exec php-cli vendor/bin/codecept run
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question