Pani Pani - 4 months ago 27
YAML Question

Laravel-Docker-Behat Localhost issue

I am trying to use Behat(for BDD) to get the content of the homepage. I just use the method from Behat\MinkExtension\Context\MinkContext

$this->visit();


but I still get page not found.
What is interesting is that I can actually

curl 127.0.0.1


and that works.
my docker-compose.yml

version: '2'

services:
nginx:
image: dydx/alpine-nginx-phpfpm
ports:
- "80:80"
volumes:
- ./www:/var/www
- ./sites:/etc/nginx/sites-enabled
network_mode: "host"

artisan:
image: spiralout/dartisan
volumes:
- ./www:/var/www

mysql:
image: spiralout/alpine-mariadb
ports:
- "3306:3306"
volumes:
- ./database:/var/lib/mysql

composer:
image: spiralout/dcomposer
volumes:
- ./www:/var/www

nodejs:
image: spiralout/dnodejs
volumes:
- ./www:/var/www

redis:
image: spiralout/alpine-redis
volumes:
- ./redis-data:/data

volumes:
www:
sites:
redis-data:


I then run

docker exec -it <nginx_name> /bin/bash


and then try to run behat

Any help appreciated

Answer

The solution to this turned out to be to recreate the project including the dev-develop flag.
composer create-project laravel/laravel new dev-develop Hope this saves time to someone

Comments