I'm looking for a way to scale up a docker-compose service & saw the --scale option but could not find any method to get the index & count within each container.
Here's a simplified compose file:
version: '2.1'
services:
my_thing:
restart: always
build: .
entrypoint: /entry.sh
depends_on:
- database
database:
restart: always
image: postgres:12.1-alpine
...
Run Code Online (Sandbox Code Playgroud)
If I did docker-compose up my_thing --scale 5 within the entry I'd like to be able
to see which instance I am (1 to 5) …