Skip to content

Commit

Permalink
dd
Browse files Browse the repository at this point in the history
  • Loading branch information
dipaish committed Jul 28, 2023
1 parent 163662a commit 5f170e1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/dockercompose.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ cd my_compose_project

**Step 2: Create a Docker Compose YAML File**

In this project directory, we will create a file named ```docker-compose.yml```. This file will contain the configuration for your multi-container environment.
In this project directory, we will create a file named ```docker-compose.yml```. This file will contain the configuration for our multi-container environment.

**Step 3: Define Services in Docker Compose**

Expand All @@ -54,7 +54,7 @@ We will define services that we need in the ```docker-compose.yml``` file.

In this example, we will define two services: **webserver** and **database.**
- The **webserver** service uses the latest Nginx image and maps the host's port 80 to the container's port 80.
- The **database.** service uses the latest MySQL image and sets environment variables for the root password,
- The **database** service uses the latest MySQL image and sets environment variables for the root password,

A docker compose file (docker-compose.yml) looks like this

Expand All @@ -63,12 +63,12 @@ version:'3'

services:
webserver:
image: nginx:latest
image: nginx
ports:
- "80:80"

database:
image: mysql:latest
image: mysql
environment:
MYSQL_ROOT_PASSWORD: password

Expand Down Expand Up @@ -112,7 +112,7 @@ In this case, we can further verify that the Nginx server is up and running by o




<hr>

- `version:3`: It specifies the version of the docker-compose file syntax.
- `services:`It describes the services that are to be run. In the above example, we have two services **web** & **redis.**
Expand Down

0 comments on commit 5f170e1

Please sign in to comment.