GithubHelp home page GithubHelp logo

Comments (4)

bibendi avatar bibendi commented on July 3, 2024

Hi!
Dip cannot do that.
I think it's better to define a separate yarn_server service in a docker-compose.yml file and make rails service depends_on: them.

from dip.

Dearest avatar Dearest commented on July 3, 2024

@bibendi Can I make a pull request to implement this feature?
maybe I will add a keyword like flow。 it will have the same level as interaction or provision
flow is very similar to provision, but it can define multiple。
maybe it look like this

interaction:
  rails:
    description: Run Rails commands
    service: rails
    command: bundle exec rails
    subcommands:
      s:
        description: Run Rails server 
        service: rails
        compose:
          run_options: [service-ports, use-aliases]

  yarn:
    description: Run Yarn commands
    service: rails
    command: yarn
    compose_run_options: [no-deps]

flow:
  start:
    - rails s
    - yarn start

I can use dip flow start to run rails s and yarn start one by one

from dip.

bibendi avatar bibendi commented on July 3, 2024

Sorry, but I think that doesn't make sense. The dip uses Process.exec to run a command. So, basically, you cannot run more than one command at a time. Another reason is how the secondary command should run? In a background? How should we be able to stop or interact with them?

Well, again, if you just need to autostart a dependent command in the background, please use Docker Compose services. The dip is just a wrapper around it. I don't want to duplicate its built-in functionality.

from dip.

Dearest avatar Dearest commented on July 3, 2024

Thank you for your reply, I see what you mean, this issiue can be closed now

from dip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.