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:
parent
bc95525543
commit
667bd9facb
79 changed files with 237 additions and 237 deletions
|
@ -7,14 +7,14 @@ Project structure:
|
|||
├── backend
|
||||
│ ├── Dockerfile
|
||||
│ ...
|
||||
├── docker-compose.yaml
|
||||
├── compose.yaml
|
||||
├── frontend
|
||||
│ ├── ...
|
||||
│ └── Dockerfile
|
||||
└── README.md
|
||||
```
|
||||
|
||||
[_docker-compose.yaml_](docker-compose.yaml)
|
||||
[_compose.yaml_](compose.yaml)
|
||||
```
|
||||
services:
|
||||
frontend:
|
||||
|
@ -42,13 +42,13 @@ services:
|
|||
...
|
||||
```
|
||||
The compose file defines an application with three services `frontend`, `backend` and `db`.
|
||||
When deploying the application, docker-compose maps port 3000 of the frontend service container to port 3000 of the host as specified in the file.
|
||||
When deploying the application, docker compose maps port 3000 of the frontend service container to port 3000 of the host as specified in the file.
|
||||
Make sure port 3000 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 "react-express-mongodb_default" with the default driver
|
||||
Building frontend
|
||||
Step 1/9 : FROM node:13.13.0-stretch-slim
|
||||
|
@ -78,7 +78,7 @@ After the application starts, navigate to `http://localhost:3000` in your web br
|
|||
|
||||
Stop and remove the containers
|
||||
```
|
||||
$ docker-compose down
|
||||
$ docker compose down
|
||||
Stopping server ... done
|
||||
Stopping frontend ... done
|
||||
Stopping mongo ... done
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue