Can you define optional docker-compose services? -


is there way define docker compose service such brought up when explicitly request it?

that say:

docker-compose 

would not start it, but

docker-compose optional_service 

would.

one way achieve define optional service in different compose file. start optional service, run:

$ docker-compose -f docker-compose.yaml -f optional-service.yaml 

for example, if have docker-compose.yaml file looks like:

version: '2.1' services:   lb:     image: nginx:1.13              db:     image: redis:3.2.9 

i can extend optional-service.yaml looks like:

version: '2.1' services:   busy:     image: busybox 

notice both compose files must use same compose file version.

you can read more in compose documentation.


Comments

Popular posts from this blog

python Tkinter Capturing keyboard events save as one single string -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

javascript - Z-index in d3.js -