0

I`m starting with docker i have the next docker-compose when i run docker-compose up all with success, when i do curl localhost works fine but when i try to access from the public ip dont works the connection timeout.

version: '3'
services:
  db:
   environment:
     - POSTGRES_PASSWORD=mipass
     - POSTGRES_USER=miuser
     - POSTGRES_DB=pdfdd
   image: postgres:9.6
  web:
   restart: always
   tty: true
   stdin_open: true
   build: .
   command: python ./code/manage.py runserver 0.0.0.0:8000
   volumes:
     - .:/code
   ports:
     - "8000:8000"
   depends_on:
     - db
  nginx:
    restart: always
    build: ./nginx/
    ports:
      - "80:80"
    volumes:
      - /www/static
      - .:/code
    links:
      - web:web
  • 2
    You've included the amazon-ec2 tag on your post. Assuming you are running it there, have you configured the included firewall to permit your newly opened ports? – BMitch Mar 15 '17 at 12:33

1 Answers1

0

Thanks @BMitch, i forgot to open 80 port in security group if someone have the same error please see Opening port 80 EC2 Amazon web services for instructions.

Community
  • 1
  • 1