【发布时间】:2022-07-07 20:17:19
【问题描述】:
所以这一定很常见,但我找不到干净利落的解决方案。
我有一个在容器内运行的烧瓶应用程序。容器使用 docker compose 运行。我的 docker-compose 中的以下命令启动应用程序:
api:
image: "project/app:latest"
restart: on-failure:3
volumes:
- ./:/usr/src/app
depends_on:
- redis
- mongo-db
tty: true
stdin_open: true
command: bin/gunicorn -a my_wsgi:app -s 0.0.0.0:4000 -p gevent -w 2 -c 2 -- --reload
ports:
- 5000:5000
我希望在我的主机上使用 VSCode 远程调试这个应用程序。我已经在我的 VSCode 中安装了远程容器扩展。现在我找不到如何在容器中运行调试器并将其连接到主机中的 VSCode。
【问题讨论】:
标签: python linux flask visual-studio-code gunicorn