From 6150d8a337c3d11a4e4211c78ede84a1931f6b81 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=94=B0=E6=B5=A9?= Date: Tue, 28 Nov 2017 19:16:27 +0800 Subject: [PATCH] update stack deploy instruction --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index e04d04c..ee2c8e9 100644 --- a/README.md +++ b/README.md @@ -28,6 +28,16 @@ Clone the project locally to your Docker host. If you would like to change which targets should be monitored or make configuration changes edit the [/prometheus/prometheus.yml](https://github.com/vegasbrianc/prometheus/blob/version-2/prometheus/prometheus.yml) file. The targets section is where you define what should be monitored by Prometheus. The names defined in this file are actually sourced from the service name in the docker-compose file. If you wish to change names of the services you can add the "container_name" parameter in the `docker-compose.yml` file. +**Note**: before deploy the stack, need modify the docker-compose.yml +``` +... +deploy: + placement: + constraints: + - node.hostname == +... +``` + Once configurations are done let's start it up. From the /prometheus project directory run the following command: $ docker stack deploy -c docker-compose.yml prom