sb logoToday I Learned

Removing services from starting in docker-compose

I recently ran into a problem where I wanted to start up all of the services in docker-compose except one. In this case, it was a postgresql instance, and I wanted to use my local instance instead.

docker-compose up --scale postgres-service=0

Using the scale option and setting it’s value to zero will prevent it from starting up.