Browse Source

update stack deploy instruction

master
田浩 5 years ago committed by GitHub
parent
commit
6150d8a337
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      README.md

10
README.md

@ -28,6 +28,16 @@ Clone the project locally to your Docker host. @@ -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 == <hostname-of-swarm-node-where-config-files-exist>
...
```
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

Loading…
Cancel
Save