This README.md file provides instructions on how to run a Docker Compose project using the docker-compose.yml
file. Docker Compose is a tool that allows you to define and run multi-container Docker applications.
Before running the docker-compose.yml
file, ensure that you have the following prerequisites installed on your machine:
- Docker: Make sure Docker is installed and running on your system. You can download Docker from the official website: https://www.docker.com
- Docker Compose: Ensure that Docker Compose is installed on your machine. Docker Compose is usually installed automatically when you install Docker.
To run the Docker Compose project, follow these steps:
-
Clone the repository:
git clone https://github.com/akashKarmakar02/campus-connect-social-media-with-ML.git
-
Navigate to the project directory:
cd <project-directory>
Replace
campus-connect-social-media-with-ML
with the path to the directory where thedocker-compose.yml
file is located. -
Customize the configuration: Open the
docker-compose.yml
file in a text editor and customize it according to your requirements. You can modify container names, ports, volumes, environment variables, etc., based on your needs. -
Build and start the containers: Run the following command to build and start the containers defined in the
docker-compose.yml
file:docker-compose up --build
-
Verify the containers: Once the command completes, you can verify that the containers are running by executing:
docker-compose ps
This command will display a list of all the containers managed by Docker Compose.
-
Access the application: Depending on the services defined in your
docker-compose.yml
file, you can access your application by opening a web browser and navigating to the specified URLs or using the defined ports. -
Stopping the containers: To stop and remove the containers defined in the
docker-compose.yml
file, use the following command:docker-compose down
This command will stop the running containers and remove them along with any associated networks and volumes.
By following the steps outlined in this README.md file, you should be able to successfully run a Docker Compose project using the docker-compose.yml
file. Feel free to customize the configuration based on your specific requirements and extend the project as needed. For more information, refer to the official Docker and Docker Compose documentation.
Happy coding!