nvlad / yii2support

Yii2 Support for PhpStorm / IntelliJ IDEA
https://plugins.jetbrains.com/idea/plugin/9388-yii2-support
Other
295 stars 53 forks source link

Migrate in docker #219

Closed ferrumfist closed 5 years ago

ferrumfist commented 5 years ago

How can I apply migrate if php in Docker

insperedia commented 5 years ago

This should be solved by you as a developer. I would open ports in docker to localmachine, and modify config so it will detect the environment and connect in the right way.

ferrumfist commented 5 years ago

OK. I could solve this by specifying the interpreter. But if I try to migrate from the vendor directory, it writes the local path to the migration file, and not the path to [docker-compose://[/home/ferrum/test/yii2/docker-compose.yml]:php/]:php /var/www/html/yii migrate/up 3 --migrationPath=/home/ferrum/test/yii2/vendor/yiisoft/yii2/rbac/migrations --db=db --migrationTable={{%migration}} --interactive=0 --color

And I think you should add a setting with the ability to select the root (relative) directory.