Adopt Compose v2 (#240)
* Adopt Compose v2 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
@@ -9,14 +9,14 @@ Project structure:
|
||||
│ ...
|
||||
├── db
|
||||
│ └── password.txt
|
||||
├── docker-compose.yaml
|
||||
├── compose.yaml
|
||||
├── frontend
|
||||
│ ├── ...
|
||||
│ └── Dockerfile
|
||||
└── README.md
|
||||
```
|
||||
|
||||
[_docker-compose.yaml_](docker-compose.yaml)
|
||||
[_compose.yaml_](compose.yaml)
|
||||
```
|
||||
services:
|
||||
backend:
|
||||
@@ -35,7 +35,7 @@ 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.
|
||||
|
||||
> ℹ️ **_INFO_**
|
||||
@@ -43,10 +43,10 @@ Make sure port 3000 on the host is not already being in use.
|
||||
> You still can use the MySQL image by uncommenting the following line in the Compose file
|
||||
> `#image: mysql:8.0.27`
|
||||
|
||||
## Deploy with docker-compose
|
||||
## Deploy with docker compose
|
||||
|
||||
```
|
||||
$ docker-compose up -d
|
||||
$ docker compose up -d
|
||||
Creating network "react-java-mysql_default" with the default driver
|
||||
Building backend
|
||||
Step 1/17 : FROM maven:3.6.3-jdk-11 AS builder
|
||||
@@ -74,7 +74,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 react-java-mysql_backend_1 ... done
|
||||
Stopping react-java-mysql_frontend_1 ... done
|
||||
Stopping react-java-mysql_db_1 ... done
|
||||
|
Reference in New Issue
Block a user