1
0
Fork 0
mirror of https://github.com/docker/awesome-compose.git synced 2025-04-19 07:18:06 +02:00

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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 237 additions and 237 deletions

View file

@ -9,11 +9,11 @@ Project structure:
├── Dockerfile
├── README.md
├── app.py
├── docker-compose.yml
├── compose.yaml
└── requirements.txt
```
[_docker-compose.yml_](docker-compose.yml)
[_compose.yaml_](compose.yaml)
```
services:
@ -31,10 +31,10 @@ services:
- redis
```
## Deploy with docker-compose
## Deploy with docker compose
```
$ docker-compose up -d
$ docker compose up -d
[+] Running 24/24
⠿ redis Pulled
...
@ -52,7 +52,7 @@ $ docker-compose up -d
Listing containers must show one container running and the port mapping as below:
```
$ docker-compose ps
$ docker compose ps
NAME COMMAND SERVICE STATUS PORTS
flask-redis-redis-1 "redis-server --load…" redis running 0.0.0.0:6379->6379/tcp
flask-redis-web-1 "/bin/sh -c 'python …" web running 0.0.0.0:5000->5000/tcp
@ -78,5 +78,5 @@ OK
Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```