Skip to content

Commit

Permalink
Adopt Compose v2 (docker#240)
Browse files Browse the repository at this point in the history
* Adopt Compose v2

Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
  • Loading branch information
ndeloof authored May 10, 2022
1 parent bc95525 commit 667bd9f
Show file tree
Hide file tree
Showing 79 changed files with 237 additions and 237 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,20 @@ deploying samples of containerized applications with Docker Compose.

### Running a sample

The root directory of each sample contains the `docker-compose.yaml` which
The root directory of each sample contains the `compose.yaml` which
describes the configuration of service components. All samples can be run in
a local environment by going into the root directory of each one and executing:

```console
docker-compose up -d
docker compose up -d
```

Check the `README.md` of each sample to get more details on the structure and
what is the expected output.
To stop and remove all containers of the sample application run:

```console
docker-compose down
docker compose down
```
<!--lint disable awesome-toc-->
## Contribute
Expand Down
12 changes: 6 additions & 6 deletions angular/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Project structure:
│   ├── ...
│   ├── ...
│   ....
└── docker-compose.yaml
└── compose.yaml
```

[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
web:
Expand All @@ -24,14 +24,14 @@ services:
```
The compose file defines an application with one service `angular`. The image for the service is built with the Dockerfile inside the `angular` directory (build parameter).

When deploying the application, docker-compose maps the container port 4200 to the same port on the host as specified in the file.
When deploying the application, docker compose maps the container port 4200 to the same port on the host as specified in the file.
Make sure port 4200 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
Creating network "angular_default" with the default driver
Building angular
Step 1/7 : FROM node:10
Expand Down Expand Up @@ -63,5 +63,5 @@ After the application starts, navigate to `http://localhost:4200` in your web br
Stop and remove the container

```
$ docker-compose down
$ docker compose down
```
File renamed without changes.
10 changes: 5 additions & 5 deletions apache-php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@
Project structure:
```
.
├── docker-compose.yaml
├── compose.yaml
├── app
   ├── Dockerfile
   └── index.php
```

[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
web:
Expand All @@ -22,10 +22,10 @@ services:
- ./app:/var/www/html/
```

## Deploy with docker-compose
## Deploy with docker compose

```
$ docker-compose up -d
$ docker compose up -d
Creating network "php-docker_web" with the default driver
Building web
Step 1/6 : FROM php:7.2-apache
Expand All @@ -52,5 +52,5 @@ Hello World!

Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```
File renamed without changes.
12 changes: 6 additions & 6 deletions aspnet-mssql/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Project structure:
| | └── ...
│   ├── ...
│   └── Dockerfile
└── docker-compose.yaml
└── compose.yaml
```

[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
web:
Expand All @@ -28,18 +28,18 @@ services:
```
The compose file defines an application with two services `web` and `db`. The image for the web service is built with the Dockerfile inside the `app` directory (build parameter).

When deploying the application, docker-compose maps the container port 80 to port 80 of the host as specified in the file.
When deploying the application, docker compose maps the container port 80 to port 80 of the host as specified in the file.
Make sure port 80 on the host is not being used by another container, otherwise the port should be changed.

> ℹ️ **_INFO_**
> For compatibility purpose between `AMD64` and `ARM64` architecture, we use Azure SQL Edge as database instead of MS SQL Server.
> You still can use the MS SQL Server image by uncommenting the following line in the Compose file
> `#image: mcr.microsoft.com/mssql/server`
## Deploy with docker-compose
## Deploy with docker compose

```
$ docker-compose up -d
$ docker compose up -d
Creating network "aspnet-mssql_default" with the default driver
Building web
Step 1/13 : FROM mcr.microsoft.com/dotnet/sdk:5.0 AS build
Expand Down Expand Up @@ -71,5 +71,5 @@ After the application starts, navigate to `http://localhost:80` in your web brow
Stop and remove the containers

```
$ docker-compose down
$ docker compose down
```
File renamed without changes.
10 changes: 5 additions & 5 deletions django/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
Project structure:
```
.
├── docker-compose.yml
├── compose.yaml
├── app
   ├── Dockerfile
   ├── requirements.txt
   └── manage.py
```

[_docker-compose.yml_](docker-compose.yml)
[_compose.yaml_](compose.yaml)
```
services:
web:
Expand All @@ -21,10 +21,10 @@ services:
- '8000:8000'
```

## Deploy with docker-compose
## Deploy with docker compose

```
$ docker-compose up -d
$ docker compose up -d
Creating network "django_default" with the default driver
Building web
Step 1/6 : FROM python:3.7-alpine
Expand All @@ -48,5 +48,5 @@ After the application starts, navigate to `http://localhost:8000` in your web br

Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```
File renamed without changes.
10 changes: 5 additions & 5 deletions elasticsearch-logstash-kibana/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
Project structure:
```
.
└── docker-compose.yml
└── compose.yaml
```

[_docker-compose.yml_](docker-compose.yml)
[_compose.yaml_](compose.yaml)
```
services:
elasticsearch:
Expand All @@ -21,10 +21,10 @@ services:
...
```

## Deploy with docker-compose
## Deploy with docker compose

```
$ docker-compose up -d
$ docker compose up -d
Creating network "elasticsearch-logstash-kibana_elastic" with driver "bridge"
Creating es ... done
Creating log ... done
Expand All @@ -50,7 +50,7 @@ After the application starts, navigate to below links in your web browser:

Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```

## Attribution
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions fastapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

Project structure:
```
├── docker-compose.yaml
├── compose.yaml
├── Dockerfile
├── requirements.txt
├── app
Expand All @@ -12,7 +12,7 @@ Project structure:
```

[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
api:
Expand All @@ -26,7 +26,7 @@ services:
```

## Deploy with docker-compose
## Deploy with docker compose

```shell
docker-compose up -d --build
Expand All @@ -49,7 +49,7 @@ After the application starts, navigate to `http://localhost:8000` in your web br

Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```


File renamed without changes.
12 changes: 6 additions & 6 deletions flask-redis/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
...
Expand All @@ -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
Expand All @@ -78,5 +78,5 @@ OK

Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```
File renamed without changes.
10 changes: 5 additions & 5 deletions flask/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
Project structure:
```
.
├── docker-compose.yaml
├── compose.yaml
├── app
   ├── Dockerfile
   ├── requirements.txt
   └── app.py
```

[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
web:
Expand All @@ -21,10 +21,10 @@ services:
- '5000:5000'
```

## Deploy with docker-compose
## Deploy with docker compose

```
$ docker-compose up -d
$ docker compose up -d
Creating network "flask_default" with the default driver
Building web
Step 1/6 : FROM python:3.7-alpine
Expand Down Expand Up @@ -52,5 +52,5 @@ Hello World!

Stop and remove the containers
```
$ docker-compose down
$ docker compose down
```
File renamed without changes.
14 changes: 7 additions & 7 deletions gitea-postgres/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ This example defines one of the base setups for Gitea. More details on how to cu
Project structure:
```
.
├── docker-compose.yaml
├── compose.yaml
└── README.md
```

[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
gitea:
Expand All @@ -23,13 +23,13 @@ services:
...
```

When deploying this setup, docker-compose maps the gitea container port 3000 to
When deploying this setup, docker compose maps the gitea container port 3000 to
the same port of the host as specified in the compose file.

## Deploy with docker-compose
## Deploy with docker compose

```
$ docker$ compose up -d
$ docker compose up -d
Creating network "gitea-postgres_default" with the default driver
Creating gitea-postgres_db_1 ... done
Creating gitea-postgres_gitea_1 ... done
Expand Down Expand Up @@ -58,10 +58,10 @@ Gitea service.
Stop and remove the containers

```
$ docker-compose down
$ docker compose down
```

To remove all Gitea data, delete the named volumes by passing the `-v` parameter:
```
$ docker-compose down -v
$ docker compose down -v
```
File renamed without changes.
Loading

0 comments on commit 667bd9f

Please sign in to comment.