{% include 'roles/docker-compose/templates/base.yml.j2' %}

  gitlab:
    image: "{{ GITLAB_IMAGE }}:{{ GITLAB_VERSION }}"
    hostname: '{{ GITLAB_HOSTNAME }}'
    container_name:  "{{ GITLAB_CONTAINER }}"
{% include 'roles/docker-container/templates/base.yml.j2' %}
    ports:
      - "127.0.0.1:{{ ports.localhost.http[application_id] }}:80"
      - "{{ports.public.ssh[application_id]}}:22"
    volumes:
      - 'config:/etc/gitlab'
      - 'logs:/var/log/gitlab'
      - 'data:/var/opt/gitlab'
    shm_size: '256m'
{% include 'roles/docker-container/templates/depends_on/dmbs_excl.yml.j2' %}
{% include 'roles/docker-container/templates/networks.yml.j2' %}

{% include 'roles/docker-compose/templates/volumes.yml.j2' %}
  config:
    name: {{ GITLAB_CONF_VOLUME }}
  logs:
    name: {{ GITLAB_LOGS_VOLUME }}
  data:
    name: {{ GITLAB_DATA_VOLUME }}

{% include 'roles/docker-compose/templates/networks.yml.j2' %}
