Adopt Compose v2 (#240)
* Adopt Compose v2 Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
This commit is contained in:
@@ -10,14 +10,14 @@ Project structure:
|
||||
│ └── main.go
|
||||
├── db
|
||||
│ └── password.txt
|
||||
├── docker-compose.yaml
|
||||
├── compose.yaml
|
||||
├── proxy
|
||||
│ ├── conf
|
||||
│ └── Dockerfile
|
||||
└── README.md
|
||||
```
|
||||
|
||||
[_docker-compose.yaml_](docker-compose.yaml)
|
||||
[_compose.yaml_](compose.yaml)
|
||||
```
|
||||
services:
|
||||
backend:
|
||||
@@ -33,13 +33,13 @@ services:
|
||||
...
|
||||
```
|
||||
The compose file defines an application with three services `proxy`, `backend` and `db`.
|
||||
When deploying the application, docker-compose maps port 80 of the proxy service container to port 80 of the host as specified in the file.
|
||||
When deploying the application, docker compose maps port 80 of the proxy service container to port 80 of the host as specified in the file.
|
||||
Make sure port 80 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 "nginx-golang-postgres_default" with the default driver
|
||||
Pulling db (postgres:)...
|
||||
latest: Pulling from library/postgres
|
||||
@@ -71,5 +71,5 @@ $ curl localhost:80
|
||||
|
||||
Stop and remove the containers
|
||||
```
|
||||
$ docker-compose down
|
||||
$ docker compose down
|
||||
```
|
||||
|
Reference in New Issue
Block a user