0

Is there a flag I can pass into docker-compose that can specify a single service within it to run?

For example:

version: "2"
services:
  fetcher:
    build:
      context: ./build1/
    environment:
      - MONGO_URL=mongodb://132.216.27.81:23012/
  fetcher2:
    build:
      context: ./build2/
    environment:
      - MONGO_URL=mongodb://132.216.27.81:23012/
    ports:
      - "45760:8121"

Is there a way for me to merely specify that I want to up only fetcher2?

Reason being I have multiple fetcher processes that run upon docker-compose up and I would much rather only select to rerun some specific ones that have failed for whatever reason rather than having all of my fetchers re-fetch info that is already stored in the DB.

1

You can use docker-compose up fetcher2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.