Rancher-compose.yml ignores scale: 0

Hi, just found out that scale: 0 doesn’t work in rancher-compose. Instead it defaults to scale: 1. I can see the point that scale should default to 1 if missing but explicit zero would be useful.

I want to stand up a stack with the database components running but the applications not. Then I can import a database restore before starting up the application. I can do this with rancher-compose up and then rancher-compose upgrade but this would be simpler. I don’t really want to automate this as it’s just for manual recovery and porting between environments.

Why not rancher-compose create follow by rancher-compose up svcA svcB ... and later when ready a full rancher-compose up.

Thanks, that works just fine. Didn’t know you could up only certain services. Easy to script as well:

rancher-compose create
rancher-compose up mysqlserver
docker attach mysqlserver mysql db < backup.sql # restore the db
rancher-compose up

This should be fixed in https://github.com/rancher/rancher/issues/2317.

Basically, 2317 will allow scale to be 0 or null.