<commit_before>version: '2'
services:
  mirror:
    image: llparse/git-mirror:0.2
    environment:
      MIRROR_ETCD_ENDPOINTS: 'http://etcd:2379'
      MIRROR_DATA_DIR: /var/git
      MIRROR_GITHUB_LISTEN_ADDR: :4141
      MIRROR_POLL_PERIOD: '${POLL_PERIOD}'
      MIRROR_REPO: '${REPO}'
      MIRROR_DEBUG: '${DEBUG}'
    labels:
      io.rancher.container.pull_image: always
      io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
      io.rancher.sidekicks: serve,logrotate
    links:
    - etcd
    volumes:
       - git-mirror:/var/git
  serve:
    image: llparse/git-serve:0.5
    environment:
      SERVER_NAME: ${SERVER_NAME}
      WORKER_CONNECTIONS: ${WORKER_CONNECTIONS}
    labels:
      io.rancher.container.pull_image: always
    network_mode: container:mirror
    volumes:
    - git-mirror:/var/git
    - ${HOST_LOG_PATH}:/var/log/nginx
  logrotate:
    image: llparse/git-logrotate:0.1
    labels:
      io.rancher.container.pull_image: always
      io.rancher.container.start_once: 'true'
      cron.schedule: "${LOGROTATE_SCHEDULE}"
    links:
    - serve
    network_mode: none
    volumes:
    - ${HOST_LOG_PATH}:/var/log/nginx
  analyze:
    image: llparse/git-analyze:0.4
    command: -period 24h
    labels:
      io.rancher.container.pull_image: always
      io.rancher.container.start_once: 'true'
      io.rancher.scheduler.affinity:host_label_soft: git.mirror=analyze
    links:
    - mirror
    volumes:
    - ${HOST_LOG_PATH}:/var/log/nginx
  etcd:
    image: rancher/etcd:v2.3.7-11
    labels:
      io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
    environment:
      RANCHER_DEBUG: '${DEBUG}'
      EMBEDDED_BACKUPS: 'false'
      ETCD_HEARTBEAT_INTERVAL: '${ETCD_HEARTBEAT_INTERVAL}'
      ETCD_ELECTION_TIMEOUT: '${ETCD_ELECTION_TIMEOUT}'
    volumes:
    {{- if eq .Values.ETCD_STORAGE "persistent" }}
    - etcd:/pdata
    {{- else }}
    - /pdata
    {{- end }}
volumes:
  git-mirror:
    driver: local
    per_container: true
    driver_opts: <commit_msg>fix path<commit_after>version: '2'
services:
  mirror:
    image: llparse/git-mirror:0.2
    environment:
      MIRROR_ETCD_ENDPOINTS: 'http://etcd:2379'
      MIRROR_DATA_DIR: /var/git
      MIRROR_GITHUB_LISTEN_ADDR: :4141
      MIRROR_POLL_PERIOD: '${POLL_PERIOD}'
      MIRROR_REPO: '${REPO}'
      MIRROR_DEBUG: '${DEBUG}'
    labels:
      io.rancher.container.pull_image: always
      io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
      io.rancher.sidekicks: serve,logrotate
    links:
    - etcd
    volumes:
       - git-mirror:/var/git
  serve:
    image: llparse/git-serve:0.5
    environment:
      SERVER_NAME: ${SERVER_NAME}
      WORKER_CONNECTIONS: ${WORKER_CONNECTIONS}
    labels:
      io.rancher.container.pull_image: always
    network_mode: container:mirror
    volumes:
    - git-mirror:/var/git
    - ${HOST_LOG_PATH}:/var/log/nginx
  logrotate:
    image: llparse/git-logrotate:0.1
    labels:
      io.rancher.container.pull_image: always
      io.rancher.container.start_once: 'true'
      cron.schedule: "${LOGROTATE_SCHEDULE}"
    links:
    - serve
    network_mode: none
    volumes:
    - ${HOST_LOG_PATH}:/log
  analyze:
    image: llparse/git-analyze:0.4
    command: -period 24h
    labels:
      io.rancher.container.pull_image: always
      io.rancher.container.start_once: 'true'
      io.rancher.scheduler.affinity:host_label_soft: git.mirror=analyze
    links:
    - mirror
    volumes:
    - ${HOST_LOG_PATH}:/var/log/nginx
  etcd:
    image: rancher/etcd:v2.3.7-11
    labels:
      io.rancher.scheduler.affinity:container_label_ne: io.rancher.stack_service.name=$${stack_name}/$${service_name}
    environment:
      RANCHER_DEBUG: '${DEBUG}'
      EMBEDDED_BACKUPS: 'false'
      ETCD_HEARTBEAT_INTERVAL: '${ETCD_HEARTBEAT_INTERVAL}'
      ETCD_ELECTION_TIMEOUT: '${ETCD_ELECTION_TIMEOUT}'
    volumes:
    {{- if eq .Values.ETCD_STORAGE "persistent" }}
    - etcd:/pdata
    {{- else }}
    - /pdata
    {{- end }}
volumes:
  git-mirror:
    driver: local
    per_container: true
    driver_opts: 
{'fraction_non_alphanumeric': 0.12573859607657764, 'fraction_numerical': 0.011344835736232569, 'mean_word_length': 2.9774436090225564, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7546162', 'n_tokens_mistral': 1650, 'n_tokens_neox': 1643, 'n_words': 221}