crazyfactory / docker-project-cli

MIT License
4 stars 1 forks source link

should we add chain functionality? #21

Closed wmathes closed 6 years ago

wmathes commented 6 years ago

imagine we have a dopr setup in ERP and it should run:

adhocore commented 6 years ago

shouldnt we use different command in docker-project.json like so:

{
    "up-run": {
      "command": ["@up -d", "@npm run setup"]
    },
    "host-cmd": {
      "service": "@host",
      "command": "ls -al"
    }
}

this requires supporting @cmd to reuse existing one.

additionally how about having a cmd that can run in host context? with service value as @host or @none or something

wmathes commented 6 years ago

allowing command to be array and then chain that sounds good :)

running stuff in host is probably also useful (but should be a separate issue).

aliasing and calling other commands from within a command (chained or not) is also neat. Separate issue as well (and i actually expect some more refactoring for this to work as the whole construction logic isn't properly encapsulated currently)