Skip to content

Gitlab

Gitlab with gitlab runner (optional)

docker-compose.yml

YAML
version: "3.6"
services:
  gitlab:
#    image: gitlab/gitlab-ce:14.10.4-ce.0
    image: gitlab/gitlab-ce:15.0.3-ce.0
    networks:
      durbok-net:
        ipv4_address: 10.0.0.124
    volumes:
      - ./data/:/var/opt/gitlab
      - ./logs/:/var/log/gitlab
      - ./config/:/etc/gitlab
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        external_url 'https://gitlab.urdomain.com'
        registry_external_url 'https://git-registry.urdomain.com'
        nginx['listen_port'] = '80'
        nginx['listen_https'] = false
        registry_nginx['listen_port'] = '80'
        registry_nginx['listen_https'] = false
        gitlab_rails['registry_enabled'] = true
        gitlab_rails['gitlab_shell_ssh_port'] = 2222
#      GITLAB_OMNIBUS_CONFIG: "from_file('/omnibus_config.rb')"
#    configs:
#      - source: gitlab
#        target: /omnibus_config.rb
    ports:
      - '2222:22'
    deploy:
      placement:
        constraints:
          - node.role == manager
      replicas: 1
      restart_policy:
        condition: on-failure
      resources:
        limits:
          memory: 2560M
  gitlab-runner:
    image: gitlab/gitlab-runner:alpine
    deploy:
      mode: replicated
      replicas: 2
configs:
  gitlab:
    file: ./gitlab.rb

networks:
  durbok-net:
#    driver: overlay
    name: durbok-net
    external: true
Back to top