MLu
MLu

Reputation: 1380

Adding a container to an existing docker-compose.yml

I've got a simple docker-compose.yml with 3 services: Grafana, Telegraf and InfluxDB - it all works as expected.

Couple days later I had to add another container: Grafana Image Renderer. I have added it to the docker-compose.yml file and can start it with docker-compose start renderer. However unlike the first 3 containers it doesn't auto-start after the instance reboot. All 4 containers have the same config including restart: always.

Is there any way to update docker-compose with the new config so that the Renderer container behaves the same as the other three without having to do docker-compose down and up again?

Upvotes: 1

Views: 1836

Answers (1)

Cyril G.
Cyril G.

Reputation: 2017

If you don't want to stop the other containers, docker-compose up will create/recreate new/updated containers and take in account the restart policy, no need to do docker-compose down.

Upvotes: 2

Related Questions