version: '3'

services:
  web:
    image: 'gitlab/gitlab-ce'
    restart: always
    hostname: 'gitlab.geumdo.net'
     
    environment:
     GITLAB_OMNIBUS_CONFIG: |
      external_url 'https://gitlab.geumdo.net'
      nginx['redirect_http_to_https'] = true
      nginx['ssl_certificate'] = "/etc/gitlab/ssl/fullchain.pem"
      nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/privkey.pem"
      nginx['ssl_dhparam'] = "/etc/gitlab/ssl/dhparams.pem"
      gitlab_rails['gitlab_shell_ssh_port'] = 2224

    ports:
      - '8081:80'
      - '4430:443'
      - '2224:22'
    volumes:
      - '${GITLAB_HOME}/config:/etc/gitlab'
      - '${GITLAB_HOME}/logs:/var/log/gitlab'
      - '${GITLAB_HOME}/data:/var/opt/gitlab'
    shm_size: '256m'
