0% found this document useful (0 votes)
1 views2 pages

Docker Compose Assignment

The document outlines an assignment focused on Docker Compose, assessing the understanding of containerized applications and deployment of a web application. It includes a detailed Docker Compose configuration for services like API, Postgres, and Redis, along with tasks for deploying a website using a specified GitHub repository. The assignment requires cloning the repository, creating necessary Docker files, building images, and managing the application with Docker Compose commands.

Uploaded by

slim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1 views2 pages

Docker Compose Assignment

The document outlines an assignment focused on Docker Compose, assessing the understanding of containerized applications and deployment of a web application. It includes a detailed Docker Compose configuration for services like API, Postgres, and Redis, along with tasks for deploying a website using a specified GitHub repository. The assignment requires cloning the repository, creating necessary Docker files, building images, and managing the application with Docker Compose commands.

Uploaded by

slim
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Docker Compose Assignment

DevOps Easy Learning

Objective
This assignment is designed to assess your understanding of Docker Compose, containerized applications,
and your ability to deploy a web application using Docker.

Part 1 - Docker Compose Analysis


Study the Docker Compose configuration below.

services:
api:
build: .
container_name: api
ports:
- "8080:8080"
environment:
DB_HOST: postgres
REDIS_HOST: redis
depends_on:
- postgres
- redis
networks:
- app-network

postgres:
image: postgres:16
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
volumes:
- postgres-data:/var/lib/postgresql/data
networks:
- app-network

redis:
image: redis:7
networks:
- app-network

volumes:
postgres-data:

networks:
app-network:
Task

Explain the Docker Compose file line by line.

Your explanation should demonstrate that you understand the configuration rather than simply describing it.

Part 2 - Deploy a Website Using Docker Compose


Using the project available in the GitHub repository below:

[Link]

1. Clone the repository.


2. Review the project structure.
3. Create an appropriate Dockerfile for the application if one is not already provided.
4. Create a [Link] file.
5. Build the Docker image.
6. Start the application using Docker Compose.
7. Verify that the website is accessible in a web browser.
8. Ensure the application can be stopped and restarted using Docker Compose commands.

You might also like