Run Graylog with Docker over HTTPS on AWS

Hi, I’m new to both Docker and Graylog hehe. I am doing the deployment of Graylog on AWS (so far I only tried on EC2, if anyone has another better ECS type please let me know) in my work and managed to do all the steps through the official documentation to run it on HTTP, but I need that runs with HTTPS. That’s where the problem is, I have a valid .crt and .key, I could even make it run HTTPS, but when it did, the inputs simply didn’t work.

I would like the help to fix my docker-compose.yml and get it ready once and for all to be used correctly so that everything communicates. The time I was able to make HTTPS work, when accessing the url with HTTP it did not automatically redirect to HTTPS (when I created my certificate, I checked the option to automatically redirect HTTP calls to HTTPS) as it should. I don’t know where the error might be, so I will deliver my docker-compose without these lines that I believe are causing all the confusion.

Please, if you can post the answer below the commented session with HTTPS thank you.

version: '3'
services:
  # MongoDB: https://hub.docker.com/_/mongo/
  mongo:
    image: mongo:3
    networks:
      - graylog
  # Elasticsearch: https://www.elastic.co/guide/en/elasticsearch/reference/6.x/docker.html
  elasticsearch:
    image: docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.2
    volumes:
      - es_data:/usr/share/elasticsearch/data
    environment:
      - http.host=0.0.0.0
      - transport.host=localhost
      - network.host=0.0.0.0
      - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
    deploy:
      resources:
        limits:
          memory: 1g
    networks:
      - graylog
  # Graylog: https://hub.docker.com/r/graylog/graylog/
  graylog:
    image: graylog/graylog:3.1
    environment:
      # (must be at least 16 characters)!
     - GRAYLOG_ROOT_USERNAME=xxxxxxxxxxxxxxx
     - GRAYLOG_ROOT_TIMEZONE=America/Sao_Paulo
      
      - GRAYLOG_ROOT_PASSWORD_SHA2=xxxxxxxxxx
      - GRAYLOG_IS_MASTER=true

      # HTTPS

    networks:
      - graylog
    depends_on:
      - mongo
      - elasticsearch
    ports:
      - "443:9000"
      - "80:9000"
      # Graylog web interface and REST API
      - 9000:9000
      # Syslog TCP
      - 1514:1514
      # Syslog UDP
      - 1514:1514/udp
      # GELF TCP
      - 12201:12201
      # GELF UDP
      - 12201:12201/udp
      - 514:514
      - 514:514/tcp
networks:
  graylog:
    driver: bridge
# Volumes for persisting data, see https://docs.docker.com/engine/admin/volumes/volumes/
volumes:
  mongo_data:
    driver: local
  es_data:
    driver: local
  graylog_journal:
    driver: local

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.