无法运行依赖项目

时间:2021-07-15 11:25:29

标签: docker intellij-idea project setup-project

我正在处理 Intellij IDEA 项目。我的主程序依赖于 docker 容器内的某个数据库服务器,因此为了运行项目,我首先运行“docker-compose”(附加屏幕上的 "RNAO Services" 配置),然后才运行我的主配置({{ 1}}).
enter image description here 我想要做的是在开始我的主要配置之前运行 docker compose。 我试图在“构建”步骤之后在主配置内的“启动前”列表中添加 docker compose 配置,但它只是在启动时冻结。我认为原因是当我尝试运行 docker compose 配置时,它没有显示为正在运行(没有可用的红色方块“停止”按钮),但它们是(我可以访问容器内的数据库)。
这是我启动 docker compose 配置时的项目外观:
enter image description here enter image description here

1 个答案:

答案 0 :(得分:0)

IDE 不会运行配置,直到 启动前 部分的所有任务都已终止。有一个相关的请求:IDEA-112294 Before Launch -> Run Another Configuration Should Support Non-Terminating Before Launch Configurations 关于它。