docs: update docs of README.mds.
summary: update command docker compose to docker-compose.
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
## Compose sample
|
||||
|
||||
### Prometheus & Grafana
|
||||
|
||||
Project structure:
|
||||
|
||||
```
|
||||
.
|
||||
├── compose.yaml
|
||||
@@ -13,6 +15,7 @@ Project structure:
|
||||
```
|
||||
|
||||
[_compose.yaml_](compose.yaml)
|
||||
|
||||
```
|
||||
services:
|
||||
prometheus:
|
||||
@@ -26,6 +29,7 @@ services:
|
||||
ports:
|
||||
- 3000:3000
|
||||
```
|
||||
|
||||
The compose file defines a stack with two services `prometheus` and `grafana`.
|
||||
When deploying the stack, docker compose maps port the default ports for each service to the equivalent ports on the host in order to inspect easier the web interface of each service.
|
||||
Make sure the ports 9090 and 3000 on the host are not already in use.
|
||||
@@ -33,7 +37,7 @@ Make sure the ports 9090 and 3000 on the host are not already in use.
|
||||
## Deploy with docker compose
|
||||
|
||||
```
|
||||
$ docker compose up -d
|
||||
$ docker-compose up -d
|
||||
Creating network "prometheus-grafana_default" with the default driver
|
||||
Creating volume "prometheus-grafana_prom_data" with default driver
|
||||
...
|
||||
@@ -46,6 +50,7 @@ Attaching to prometheus, grafana
|
||||
## Expected result
|
||||
|
||||
Listing containers must show two containers running and the port mapping as below:
|
||||
|
||||
```
|
||||
$ docker ps
|
||||
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
|
||||
@@ -60,6 +65,7 @@ Navigate to `http://localhost:3000` in your web browser and use the login creden
|
||||
Navigate to `http://localhost:9090` in your web browser to access directly the web interface of prometheus.
|
||||
|
||||
Stop and remove the containers. Use `-v` to remove the volumes if looking to erase all data.
|
||||
|
||||
```
|
||||
$ docker compose down -v
|
||||
$ docker-compose down -v
|
||||
```
|
||||
|
Reference in New Issue
Block a user