Open browser after spinning up containers? #1222
Replies: 4 comments 4 replies
-
also, if it makes sense I could give this one a crack at contributing :) |
Beta Was this translation helpful? Give feedback.
-
It's an interesting idea, and I think could be implemented through something like what #78 proposes - what do you think? |
Beta Was this translation helpful? Give feedback.
-
That sounds great! Here's a thought: what if we specified tasks like this:
|
Beta Was this translation helpful? Give feedback.
-
thinking about this a little more though... the biggest reason I use batect is to make a platform independent development environment. If we started to add "host tasks" in here, I feel like we might be running the risk of turning Batect into something it's specifically not: a generalized task executor. In the above example, the 'xdg-open' would most likely work for most Unix/Linux platforms - but excludes probably Windows-based hosts. In this case, we would want to define some form of "If this host, do this command, if Windows, do this other thing"... which could get pretty hairy. But maybe having predefined tasks such as "open browser", or something would be nice? And also how to implement your own custom "host task" that is platform independent? |
Beta Was this translation helpful? Give feedback.
-
Hey! I've been using Batect now for a bit, but I've been wondering about this one: is there a way to have batect know that we are spinning up a web interface that we would want to open a browser to? For example, usually when you do a
create-react-app
and then donpm start
, NPM would open the browser for you once the development server has started.However, I started to wonder if it was appropriate for Batect to handle. To me, it seems like a nice efficiency to have in my
batect.yml
, but I could understand it being interesting to justify a "who should be the one to do that".Personally, I've been trying to get to a cool spot with using batect to manage architecture diagrams using drawio's docker images (https://hub.docker.com/r/jgraph/drawio/). It would be awesome if I could have my architecture diagram automatically spin up with a
./batect diagrams
and then it automatically open the browser to the location I'd like it to open.Interested to hear folks' thoughts!
Beta Was this translation helpful? Give feedback.
All reactions