Adopt Compose v2 (#240)

* Adopt Compose v2

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
Nicolas De loof
2022-05-10 11:59:25 +02:00
committed by GitHub
parent bc95525543
commit 667bd9facb
79 changed files with 237 additions and 237 deletions

View File

@@ -4,7 +4,7 @@
Project structure:
```
.
├── docker-compose.yml
├── compose.yaml
├── grafana
│   └── datasource.yml
├── prometheus
@@ -12,7 +12,7 @@ Project structure:
└── README.md
```
[_docker-compose.yml_](docker-compose.yml)
[_compose.yaml_](compose.yaml)
```
services:
prometheus:
@@ -27,13 +27,13 @@ services:
- 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.
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.
## Deploy with docker-compose
## 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
...
@@ -61,5 +61,5 @@ Navigate to `http://localhost:9090` in your web browser to access directly the w
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
```