Description
I originally asked this on SO without resolution, so I assume it's not possible, and hence this feature request.
Description
I have a number of services in a docker stack, where some are started manually only.
docker-compose.yml:
services:
other:
# ...
app:
# ...
depends_on:
- postgres
deploy:
replicas: 0
postgres:
# ...
deploy:
replicas: 0
pgadmin:
# ...
deploy:
replicas: 0
I can start app and postgres like this:
docker compose up -d --scale app=1 --scale postgres=1
If I then start pgadmin:
docker compose up -d --scale pgadmin=1
...it will stop app and postgres and then start pgadmin. I don't want to stop them.
I assume I can't scale a service without impacting existing services. The only reason I can imagine is the swarm reasoning: you tell compose what state you want, and it scales services to get to that state. BUT: 1) I'm not using swarm, and 2) why should that be the rule?
This is a very common use case, and the only workaround is complex hard-to-maintain scripts.
Please allow us to scale services without side effects. For example via a --scale-independently switch:
docker compose up -d --scale pgadmin=1 --scale-independently
Docker would realise that other services are already running, so that command would be equivalent to:
docker compose up -d --scale app=1 --scale postgres=1 --scale pgadmin=1
Description
I originally asked this on SO without resolution, so I assume it's not possible, and hence this feature request.
Description
I have a number of services in a docker stack, where some are started manually only.
docker-compose.yml:I can start
appandpostgreslike this:docker compose up -d --scale app=1 --scale postgres=1If I then start
pgadmin:docker compose up -d --scale pgadmin=1...it will stop
appandpostgresand then startpgadmin. I don't want to stop them.I assume I can't scale a service without impacting existing services. The only reason I can imagine is the swarm reasoning: you tell compose what state you want, and it scales services to get to that state. BUT: 1) I'm not using swarm, and 2) why should that be the rule?
This is a very common use case, and the only workaround is complex hard-to-maintain scripts.
Please allow us to scale services without side effects. For example via a
--scale-independentlyswitch:docker compose up -d --scale pgadmin=1 --scale-independentlyDocker would realise that other services are already running, so that command would be equivalent to:
docker compose up -d --scale app=1 --scale postgres=1 --scale pgadmin=1