How to dynamically set a Docker Compose SDK for a project?

已回答

I'm creating a service template for future microservices on my company. One of the goals is to make initial config minimal as possible, which includes automatically setting up a Docker Composer SDK from the docker-compose.yml that we created to spin up a remote interpreter.

Unfortunately, I've been struggling to find a way to pre-define the project SDK in the service template. On the .iml files, I can only specify the interpreter name, but it makes no impact since it points to a global SDK, which does not exist when the user clone the template.

Is there an way of dynamically creating a global SDK from a docker-compose.yml service and assign to the current project?

0

Hello, Hugo Vinicius Sartori. Could you please specify which language do you use? 

Please note that adding Docker Compose interpreters is not supported for all languages. For example, there is no such option for Java; it is only possible to run Java applications using Run Targets.

0

Hello Olga Mulina . I'm using Python on my project. This is a setup that is standard and currently used on our projects, so I'm trying to figure out how to automatically set up this in the project so the programmer does not need to manually go to the module settings, add a Global SDK, choose the correct docker compose service to add as a remote interpreter, and assign to the project. Seems simple enough, bust a lot of programmers mess up something when doing this and we end up with seeing a lot of weird IDE setups when doing pair programming sessions …

0

Hugo Vinicius Sartori It might be possible for local interpreters if you prepare workspace files for IDE config, jdk.table.xml and .idea but unfortunately, for Docker interpreters, no. 

Feel free to create a new feature request on YouTrack so our QA and developers are aware of your use case - https://youtrack.jetbrains.com/newIssue?project=PY

0

请先登录再写评论。