Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS BeansTalk expose docker port

I am trying to deploy an instance of Docker Gogs image to AWS.
The environment and application starts fine, but the only visible port is 80, while I have "EXPOSE 3000" in my Docker file.
I added the following Dockerrun.aws.json to my git repo and deployed to AWS, but the port is still not visible.

{
  "AWSEBDockerrunVersion": "1",
  "Ports": [
    {
      "ContainerPort": "3000"
    }
  ]
}
like image 816
Daniil Shevelev Avatar asked Sep 28 '22 18:09

Daniil Shevelev


1 Answers

The container should expose port 3000. The container serves as the upstream for the nginx server running on the EC2 instance. Nginx server listens on port 80 and redirects traffic to the container listening 3000. Are you seeing this behavior? If not can you please share the output of docker ps on the instance?

like image 50
Rohit Banga Avatar answered Oct 06 '22 02:10

Rohit Banga