Z
Z
ZaurK2018-07-10 17:47:59
Docker
ZaurK, 2018-07-10 17:47:59

Why don't yii2 migrations work?

Launched yii2 basic on docker, but when I try to run migrations it gives an error

Exception 'yii\db\Exception' with message 'could not find driver'

Tell me, please, what kind of driver are we talking about and how to make the migrations work? There is little information on the subject and could not find anything intelligible.
Here is docker-compose.yml:
version: '3.4'
services:
  web:
    image: phpearth/php:7.2-apache
    volumes:
      - ./:/var/www/localhost/htdocs
    ports:
      - 8000:80
    links:
        - mysql
      
  mysql:
    image: mysql:5.7
    volumes:
        - ~/projects/basic/composer-docker/mysql:/var/lib/mysql
    environment:
        - "MYSQL_ROOT_PASSWORD=secret"
        - "MYSQL_USER=app"
        - "MYSQL_PASSWORD=secret"
        - "MYSQL_DATABASE=app"
    ports:
        - '33061:3306'
  
  
  phpmyadmin:
    image: phpmyadmin/phpmyadmin
    container_name: phpmyadmin
    restart: always
    environment:
      PMA_HOST: mysql
      MYSQL_USERNAME: app
      MYSQL_ROOT_PASSWORD: secret
    ports:
     - 8080:80
    volumes:
     - /sessions
    links:
      - 'mysql:mysql'

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Yanyshev, 2018-07-10
@villiwalla

You wouldn’t need to master Docker and migrations, at least copy the technology, open Yandex, paste and enter
https://stackoverflow.com/questions/46816376/excep...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question