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

@@ -6,7 +6,7 @@ Project structure:
```
.
├── README.md
├── docker-compose.yml
├── compose.yaml
├── nginx
│   ├── Dockerfile
│   └── nginx.conf
@@ -19,7 +19,7 @@ Project structure:
```
[_docker-compose.yml_](docker-compose.yml)
[_compose.yaml_](compose.yaml)
```
redis:
image: 'redislabs/redismod'
@@ -46,16 +46,16 @@ redis:
- web2
```
The compose file defines an application with four services `redis`, `nginx`, `web1` and `web2`.
When deploying the application, docker-compose maps port 80 of the nginx service container to port 80 of the host as specified in the file.
When deploying the application, docker compose maps port 80 of the nginx service container to port 80 of the host as specified in the file.
> **_INFO_**
> Redis runs on port 6379 by default. Make sure port 6379 on the host is not being used by another container, otherwise the port should be changed.
## Deploy with docker-compose
## Deploy with docker compose
```
$ docker-compose up -d
$ docker compose up -d
[+] Running 24/24
⠿ redis Pulled ...
⠿ 565225d89260 Pull complete
@@ -103,6 +103,6 @@ web2: Total number of visits is: 3
## Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```