Posts

Showing posts with the label #ec2

Deploy Flask Restful Api Nginx Docker image on Docker | Pull the Docker image | Execute the Docker image

Image
Following are steps to Deploy the Flask Restful API on Docker: Once you have connected to EC2 instance using PuTTY then follow these instructions. 1) Install Docker [ec2-user@ip-172-31-20-251 ~]$ sudo yum install -y docker 2) Start the services of the Docker [ec2-user@ip-172-31-20-251 ~]$ sudo service docker start [ec2-user@ip-172-31-20-251 ~]$ sudo usermod -a -G docker ec2-user 3) Run the Superuser command to get all the permission to perform other task [ec2-user@ip-172-31-20-251 ~]$ sudo su 4)   Verify that the ec2-user can run Docker commands without sudo. [root@ip-172-31-20-251 ec2-user]#  docker info In some cases, you may need to reboot your instance to provide permissions for the ec2-user to access the Docker daemon. Try rebooting your instance if you see the following error: Cannot connect to the Docker daemon. Is the docker daemon running on this host? Sign up for a Docker Hub Account Docker uses images that are s...

Deploy Flask RESTFUL API on AWS EC2 server using PUTTY

Image
Follow this simple steps to follow to deploy flask RESTFUL API on AWS EC2 server: 1) Create an EC2 instance on AWS: Select the EC2 instance and proceed forward. 2) Select the General Purpose t2.micro Free tier eligible Instance. 3) In next steps you don't have to do much just keep on moving ahead. Next step would be to add storage. 4) Create a new key pair and download it. 5) Hit Launch Instance. Give it few seconds to launch. Then open PUTTYgen from START. 6)  Click Load then browse the key pair, select it and click on Open . 7) Then save the private key to the same Folder location and click Yes   and save the private key . 8) Close PuTTYgen then copy the Public DNS address from the EC2 instance. 9) Open Putty then type e c2-user@    in the Host Name and the Public DNS address to it. 10)  In the Saved Sessions you can add a name to save the session. Just type in the Saved...