Changes between Version 16 and Version 17 of dockerdeployment2023


Ignore:
Timestamp:
Dec 11, 2023, 10:48:10 AM (12 months ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • dockerdeployment2023

    v16 v17  
    343343'''Key Concepts'''
    344344
    345     Services: Each container started by Docker Compose is a service. Services are defined in the docker-compose.yml file.
     345    Services: Each container started by Docker Compose is a service. Services are defined in the compose.yaml file.
    346346    Networks: By default, Docker Compose sets up a single network for your application. Each container for a service joins the default network and is discoverable via a hostname identical to the container name.
    347347    Volumes: Volumes can be used to share files between the host and container or between containers.
     
    349349'''Basic docker compose Commands'''
    350350
    351 •          ` docker compose up`: Starts up the services defined in the docker-compose.yml file.
    352 •          ` docker compose down`: Stops and removes all the containers defined in the docker-compose.yml file.
     351•          ` docker compose up`: Starts up the services defined in the compose.yaml file.
     352•          ` docker compose down`: Stops and removes all the containers defined in the compose.yaml file.
    353353•          ` docker compose ps`: Lists the services and their current state (running/stopped).
    354354•          `docker compose logs`: Shows the logs from the services.
     
    357357
    358358Let's deploy a !WordPress application using two containers: one for !WordPress and another for the MySQL database.
    359 Create a docker-compose.yml file:
     359Create a compose.yaml file:
    360360
    361361{{{
     
    394394 }}}
    395395
    396 '''Start the !WordPress and Database Containers:'''Navigate to the directory containing the `docker-compose.yml` file and run:
     396'''Start the !WordPress and Database Containers:'''Navigate to the directory containing the `compose.yaml` file and run:
    397397
    398398`docker compose up -d`