Access gitlab running in docker via IP:PORT

I’m trying to set up GitLab as a docker container in an internal server. Let’s assume the server’s IP is 10.10.10.10 . Below is my docker-compose file that I use to bring up the container. I’m unable to access the http url via localhost:4080 (from a browser within the server) OR via the IP 10.10.10.10:4080 . I’d like to understand what I’m missing here.

version: '2'

services:
  
  gitlab:
    image: gitlab-ee-img:12.0.9-ee.0
    container_name: gitlab
    restart: always
    hostname: '10.10.10.10'
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        # Add any other gitlab.rb configuration here, each on its own line
        # external_url 'https://gitlab.example.com'
        external_url 'http://10.10.10.10:4080'
        gitlab_rails['gitlab_shell_ssh_port'] = 4022
    ports:
      - '4080:80'
      - '4443:443'
      - '4022:22'
    volumes:
      - '/data/gitlab/config:/etc/gitlab'
      - '/data/gitlab/logs:/var/log/gitlab'
      - '/data/gitlab/data:/var/opt/gitlab'

I did a bit of digging around here and happened to land at this thread
Setting the below works. Looks like I’ve asked before looking deeper in the forums.

ports:
      - '4080:4080'
      - '4443:443'
      - '4022:22'

Thanks!