I use docker and do laravel new blog, after that I do php artisan migrate and get this error:
SQLSTATE[HY000] [2002] php_network_getaddresses: getaddrinfo failed: Name or service not known (SQL: select * from information_schema.tables where table_schema = books and table_name = migrations and table_type = 'BASE TABLE')
So what I do wrong?
This is my docker-compose.yml, I use mariaDB and adminer instead phpmyadmin
version: '3'
services:
web:
build: ./web
environment:
- APACHE_RUN_USER=#1000
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
- ./web/php.ini:/usr/local/etc/php/php.ini
ports:
- 8080:80
working_dir: ${APP_PATH_CONTAINER}
db:
image: mariadb
restart: always
environment:
MYSQL_ROOT_PASSWORD: 12345
volumes:
- ${DB_PATH_HOST}:/var/lib/mysql
adminer:
image: adminer
restart: always
ports:
- 6080:8080
composer:
image: composer:1.6
volumes:
- ${APP_PATH_HOST}:${APP_PATH_CONTAINER}
working_dir: ${APP_PATH_CONTAINER}
command: composer install