Create EC2 instance
Install docker-compose :---
Following steps for installation:
Docker-comopse work on Docker engine , so we need to install docker & start docker services
a.#yum install docker
b. #systemctl start docker
for docker-compose on google search standalone:
docker-compose standalone install
(https://docs.docker.com/compose/install/standalone/)
a. #curl -SL https://github.com/docker/compose/releases/download/v2.20.3/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
b. #chmod +x /usr/local/bin/docker-compose
To check Docker-compse install or not--
#docker-compse version
create two directory one for mysql data base volume & other is for docker-compose code:--
This is code written in yaml language:
To view docker-compose file:
our three-tier architecture created with the help Of Docker-compose
To Run Docker-compose file .. we used
#docker-compose up -d
we use detached because it helps us to run or launch container in background
#docker-compose ls' is command will tell us which file is used to lauch container
# docker-compose ps ' is command that give us info about running container from docker-compose file
#docker-compose logs' is command used to see logs of container.
To access this docker-compose setup -->>instance public IP+Port no.(Change EC2 instance inbound rule)
This interface shows on google:-