I am yet to find an elegant and efficient way to run Laravel Artisan commands in my Docker based local dev environment.
有没有人能推荐一种推荐的或"适当的"方式来做像迁移这样的事情?
或者,有人找到了一种巧妙的方法吗?最好是有例子或建议.
我考虑过的事情:
- 一个新的容器(共享相同的卷和数据库链接)与ssh一起使用,仅用于运行命令(看起来很糟糕).
- Hacks in supervisor that could then end up running on live (not ideal).
- Editing db configs, or trying to hack in a "host" environment, so that at least things like migrate can be run from the host.
- Creating web front ends to run things (really nasty).
- 试图为it事物建立一个"信号".
I'm still getting my head around Docker and it's new-container-for-everything approach.
I suppose I want to balance cool-dev-ops stuff with why-do-I-need-another-fake-server-just-get-it-working-already.
我很愿意在我的开发工作流程中使用它,但在某些情况下使用它似乎会变得很尴尬,就像这样……
Any suggestions and ideas are welcome. Thanks all.