services:
  web:
    image: 'gitlab/gitlab-ce:latest'
    container_name: gitlab
    restart: always
    hostname: 'gitlab.xiezhu.me'
    environment:
      GITLAB_ROOT_PASSWORD: 'Meta815899'
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://gitlab.xiezhu.me'
        gitlab_rails['gitlab_shell_ssh_port'] = 18022
        
        # Disable internal Nginx
        nginx['enable'] = false
        
        # Configure Workhorse to listen on TCP
        gitlab_workhorse['listen_network'] = "tcp"
        gitlab_workhorse['listen_addr'] = "0.0.0.0:8181"

    ports:
      - '18443:8181'
      - '18022:22'
    volumes:
      - '/mnt/nfs/gitlab/config:/etc/gitlab'
      - '/mnt/nfs/gitlab/logs:/var/log/gitlab'
      - '/mnt/nfs/gitlab/data:/var/opt/gitlab'
    shm_size: '256m'
