Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto connect docker tramp or activate #12

Open
olymk2 opened this issue Mar 12, 2019 · 7 comments
Open

Auto connect docker tramp or activate #12

olymk2 opened this issue Mar 12, 2019 · 7 comments

Comments

@olymk2
Copy link
Contributor

olymk2 commented Mar 12, 2019

Is there a way to just open a docker connection, looking at the code this does not happen because it uses tramp-file variable to determine if its a docker container which on first opening a project I do not have.

Looking for a more pragmatic / automated solution the project has a compose file so should just start using docker, if this is not possible I may add an activate-docker type method, but what are you thoughts would auto connect be okay or would you prefer an activate docker type function ?

@proofit404
Copy link
Contributor

Hi,

As I said earlier I prefer to keep activation function as generic as possible. So no specifics like pythonic-activate-pipenv-in-tox-in-docker-compose-project.

I'm not sure how you end up in a situation where you need to open tramp connection instantly?

Regards, Artem.

@olymk2
Copy link
Contributor Author

olymk2 commented Mar 12, 2019

ah sorry forgot I had asked this before, I guess because I am working with pythonic directly in places I often run a function which results in pythonic using my local python instead of the one inside docker which I alsomost never want, so your basically saying an activate function would be external to pythonic ?

And because you already have pythonic activate for env seems like something similar should be available for the other options.

@proofit404
Copy link
Contributor

I mean pythonic-activate should support everything. Docker compose, pipenv, poetry, tox, etc.

@olymk2
Copy link
Contributor Author

olymk2 commented Mar 12, 2019

ah perhaps I should be calling that in my custom code, I assume calling it multiple times is safe ?

@proofit404
Copy link
Contributor

Yes, it can.

But I don't think it's the right choice.

In my opinion pythonic-run and pythonic-start should check if current directory was activated or not.

@olymk2
Copy link
Contributor Author

olymk2 commented Mar 12, 2019

okay thanks as always will have another stab tomorrow when at work :)

@olymk2
Copy link
Contributor Author

olymk2 commented Mar 13, 2019

running pythonic activate requests an Env path, which I don't have and does not seem to be detecting and connecting to my running container :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants