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

Additional API proposal #3

Closed
modjke opened this issue Jun 16, 2018 · 5 comments
Closed

Additional API proposal #3

modjke opened this issue Jun 16, 2018 · 5 comments
Assignees

Comments

@modjke
Copy link
Contributor

modjke commented Jun 16, 2018

So while i was implementing an npm build system for my docker-compose project i had this idea of changing existing API for this module (or adding it on top of an existing one) to make this module more OOPeish and to avoid repetion of cwd , log and other parameters.
Would you be interested in something like this?

const DockerCompose = require('docker-compose')
// DockerCompose.method will still be a thing (legacy support), but the main course is
const compose = new DockerCompose({
  cwd: '.',
  log: false,
  config: 'docker-compose.yml'
})

await compose.build()
await compose.up()
const container = 'node'
const command = 'npm install'
await compose.exec(container, command, {
  log: true, // will override initial constructor settings
  workdir: './var/www' //  cli args for exec and other commands will be also supported
})
@AlexZeitler
Copy link
Contributor

That's indeed something we've been thinking about. So feel free to add it. Again, looking forward to it.

@modjke
Copy link
Contributor Author

modjke commented Jun 24, 2018

That's gonna take some time, don't give up on me :)

@AlexZeitler
Copy link
Contributor

AlexZeitler commented Jun 24, 2018 via email

@SgtPooki
Copy link

maybe i'm missing something but how exactly is this proposal different than what exists? Can you call out the changes and additions so others could see the pros/cons of your proposal?

@modjke
Copy link
Contributor Author

modjke commented Nov 25, 2018

maybe i'm missing something but how exactly is this proposal different than what exists? Can you call out the changes and additions so others could see the pros/cons of your proposal?

Well, it was created long time ago and API has changed since, no reason to keep this open anylonger

@modjke modjke closed this as completed Nov 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants