Changes between Version 13 and Version 14 of dockerdeployment2023
- Timestamp:
- Dec 11, 2023, 10:04:40 AM (16 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
dockerdeployment2023
v13 v14 339 339 '''What is Docker Compose?''' 340 340 341 Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you can define a multi-container application in a single file, then spin up your application with a single command (docker -compose up).341 Docker Compose is a tool for defining and running multi-container Docker applications. With Compose, you can define a multi-container application in a single file, then spin up your application with a single command (docker compose up). 342 342 343 343 '''Key Concepts''' … … 347 347 Volumes: Volumes can be used to share files between the host and container or between containers. 348 348 349 '''Basic docker -compose Commands'''350 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.353 • ` docker -compose ps`: Lists the services and their current state (running/stopped).354 • `docker -compose logs`: Shows the logs from the services.349 '''Basic docker compose Commands''' 350 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. 353 • ` docker compose ps`: Lists the services and their current state (running/stopped). 354 • `docker compose logs`: Shows the logs from the services. 355 355 356 356 '''Deploying !WordPress with Docker Compose''' … … 396 396 Start the !WordPress and Database Containers: Navigate to the directory containing the `docker-compose.yml` file and run: 397 397 398 `docker -compose up -d`398 `docker compose up -d` 399 399 400 400 This command will start the services in detached mode. Once the services are up, you can access the !WordPress site by navigating to `http://<MASTER_IP>:8080` from your browser. … … 402 402 Stopping the Services: To stop the services, navigate to the same directory and run: 403 403 404 `docker -compose down`404 `docker compose down` 405 405 406 406 Best Practices