pass options to enable container without having to go through cli prompt - takeout

just some thoughts. i'm coming from laradock and i was looking for something lighter. takeout seems to be a great option, but from my tests and what i can get from the code, we have to go through the prompts. that makes it hard to automatize.

to give you an idea of my workflow, i run one command through itermocil, and it opens a bunch of terminal panels, goes into the right directories, boot up docker containers with the right options, run npm run watch in them, etc... basically i call one command, i wait for 20 seconds, and my project is up with the right version of PHP, mysql, redis, etc, etc. that would be pretty nice to be able to do this with takeout. any thought?

Asked Oct 02 '21 06:10
avatar godbout
godbout

6 Answer:

I love that idea! :) Do you think you could propose a syntax?

1
Answered Jan 16 '21 at 15:18
avatar  of mattstauffer
mattstauffer

(Sorry for the delay in response. It's been... quite a year.)

1
Answered Jan 16 '21 at 15:18
avatar  of mattstauffer
mattstauffer

I can help with a PR if there is any specific syntax in mind.

1
Answered Jan 20 '21 at 23:59
avatar  of mabadir
mabadir

no worries.

the syntax, good question. kinda subjective i think. personally i'm a big fan of two things: intuitive, but also following a used consensus. i guess it'd be nice to have both. like the typical -p for port, etc..., and something more intuitive too (in the case of port, well, like --port, which in this case is also the consensus 😅️). i'll do more research and come back to you. (currently i'm automatically printing the port i need in a terminal panel and starting takeout in another one. i still have to choose manually but i have all the info i need so it's still pretty straightforward.)

1
Answered Jan 21 '21 at 09:37
avatar  of godbout
godbout

Maybe a possible solution to this would be something like takeout taste-test, which is almost the same as takeout enable in that it runs you through the prompts, but then instead of actually executing the docker run command it just echos it out to the terminal. Someone could then just copy-paste that into their automation scripts and modify as needed.

1
Answered Mar 10 '21 at 22:47
avatar  of wunc
wunc

@wunc We could certainly enable that using something like --dry-run to any of the commands. That doesn't perfectly solve this issue, but it would help.

1
Answered Mar 15 '21 at 19:57
avatar  of mattstauffer
mattstauffer