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:06:17 +02:00
parent bc95525543
commit 30f613f1a9
68 changed files with 228 additions and 228 deletions

View File

@@ -4,14 +4,14 @@
Project structure:
```
.
├── docker-compose.yaml
├── compose.yaml
├── README.md
└── vuejs
├── Dockerfile
└── ...
```
[_docker-compose.yaml_](docker-compose.yaml)
[_compose.yaml_](compose.yaml)
```
services:
web:
@@ -23,13 +23,13 @@ services:
- /project/node_modules
```
The compose file defines an application with one service `vuejs`.
When deploying the application, docker-compose maps port 8080 of the web service container to port 8080 of the host as specified in the file.
When deploying the application, docker compose maps port 8080 of the web service container to port 8080 of the host as specified in the file.
Make sure port 8080 on the host is not already being in use.
## Deploy with docker-compose
## Deploy with docker compose
```
$ docker-compose up -d
$ docker compose up -d
Creating network "vuejs_default" with the default driver
Building web
Step 1/8 : FROM node:13.10.1-alpine
@@ -54,7 +54,7 @@ After the application starts, navigate to `http://localhost:80` in your web brow
Stop and remove the containers
```
$ docker-compose down
$ docker compose down
Stopping vuejs_web_1 ... done
Removing vuejs_web_1 ... done
Removing network vuejs_default