<commit_before>version: '3.3'


services:


  nginx:
    build:
      context: ./nginx
      args:
        - UID={{ if eq "linux" .Os }}${UID}{{ else }}1000{{ end }}
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-nginx
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    labels:
      - traefik.backend={{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-nginx
      {{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
      {{- if eq $env $.EnvFiles.Kickoff.ENV }}
      - traefik.frontend.rule=Host:{{ $virtualhost }},www.{{ $virtualhost }}
      {{- end }}
      {{- end }}
      - traefik.docker.network=kickoff_proxy
    networks:
      - proxy
      - backend
    volumes:
      {{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
      - {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }}_sync_app:/var/www/html:nocopy
      {{- else }}
      - ../app:/var/www/html:{{ if eq "darwin" .Os }}cached{{ else }}ro{{ end }}
      {{- end }}
      - ./nginx/conf.d/php-fpm.conf:/etc/nginx/conf.d/php-fpm.conf:ro
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201


  php-fpm:
    build: ./php-fpm
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-php-fpm
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    entrypoint: /usr/local/bin/docker-entrypoint.sh
    networks:
      - backend
    environment:
      - UID={{ if eq "linux" .Os }}${UID}{{ else }}1000{{ end }}
    labels:
      - traefik.enable=false
    volumes:
      {{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
      - {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }}_sync_app:/var/www/html:nocopy
      {{- else }}
      - ../app:/var/www/html:{{ if eq "darwin" .Os }}cached{{ else }}rw{{ end }}
      {{- end }}
      - ./php-fpm/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh:ro
      - ./php-fpm/conf.d/memory-limit.ini:/usr/local/etc/php/conf.d/memory-limit.ini:ro
      - ./php-fpm/php-fpm.d/memory-limit.conf:/usr/local/etc/php-fpm.d/memory-limit.conf:ro
      - ./php-fpm/php-fpm.d/security.conf:/usr/local/etc/php-fpm.d/security.conf:ro
      - ./php-fpm/php-fpm.d/uploads.conf:/usr/local/etc/php-fpm.d/uploads.conf:ro
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201


  mysql:
    image: mysql:5.7
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-mysql
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    networks:
      - backend
    {{- if eq "true" .EnvFiles.Kickoff.MYSQL_ENABLE_PORTS_MAPPING }}
    ports:
      - "{{ .EnvFiles.Kickoff.MYSQL_HOST_PORT_TO_MAP }}:3306"
    {{- end }}
    environment:
      - MYSQL_USER={{ .Values.Kickoff.mysql.user }}
      - MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password
    secrets:
      - mysql_password
      - mysql_root_password
    labels:
      - traefik.enable=false
    volumes:
      - mysql_data:/var/lib/mysql
      - ./mysql/conf.d/utf8mb4.cnf:/etc/mysql/conf.d/utf8mb4.cnf:ro
      - ./mysql/docker-entrypoint-initdb.d/databases.sql:/docker-entrypoint-initdb.d/databases.sql:ro
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201

{{ if eq "local" .EnvFiles.Kickoff.ENV }}
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:4.7
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-phpmyadmin
    restart: "no"
    networks:
      - proxy
      - backend
    environment:
      - PMA_HOST=mysql
      - PMA_USER=root
      - PMA_PASSWORD={{ .EnvFiles.Kickoff.MYSQL_ROOT_PASSWORD }}
    labels:
      - traefik.backend={{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-phpmyadmin
      {{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
      {{- if eq $env $.EnvFiles.Kickoff.ENV }}
      - traefik.frontend.rule=Host:phpadmin.{{ $virtualhost }}
      {{- end }}
      {{- end }}
      - traefik.docker.network=kickoff_proxy
    volumes:
      - phpmyadmin_data:/sessions
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201
{{ end }}

  redis:
    image: redis:3.2-alpine
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-redis
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    command: redis-server --requirepass {{ .EnvFiles.Kickoff.REDIS_PASSWORD }}
    networks:
      - backend
    labels:
      - traefik.enable=false
    volumes:
      - redis_data:/data
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201


  rabbitmq:
    image: rabbitmq:3.6-management-alpine
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-rabbitmq
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    hostname: rabbitmq
    networks:
      - proxy
      - backend
    environment:
      - RABBITMQ_DEFAULT_USER={{ .Values.Kickoff.rabbitmq.user }}
      - RABBITMQ_DEFAULT_PASS={{ .EnvFiles.Kickoff.RABBITMQ_PASSWORD }}
    labels:
      - traefik.backend={{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-rabbitmq
      {{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
      {{- if eq $env $.EnvFiles.Kickoff.ENV }}
      - traefik.frontend.rule=Host:rabbitmq.{{ $virtualhost }}<commit_msg>updating RabbitMQ version (3.6 -> 3.6.10) (#20)<commit_after>version: '3.3'


services:


  nginx:
    build:
      context: ./nginx
      args:
        - UID={{ if eq "linux" .Os }}${UID}{{ else }}1000{{ end }}
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-nginx
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    labels:
      - traefik.backend={{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-nginx
      {{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
      {{- if eq $env $.EnvFiles.Kickoff.ENV }}
      - traefik.frontend.rule=Host:{{ $virtualhost }},www.{{ $virtualhost }}
      {{- end }}
      {{- end }}
      - traefik.docker.network=kickoff_proxy
    networks:
      - proxy
      - backend
    volumes:
      {{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
      - {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }}_sync_app:/var/www/html:nocopy
      {{- else }}
      - ../app:/var/www/html:{{ if eq "darwin" .Os }}cached{{ else }}ro{{ end }}
      {{- end }}
      - ./nginx/conf.d/php-fpm.conf:/etc/nginx/conf.d/php-fpm.conf:ro
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201


  php-fpm:
    build: ./php-fpm
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-php-fpm
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    entrypoint: /usr/local/bin/docker-entrypoint.sh
    networks:
      - backend
    environment:
      - UID={{ if eq "linux" .Os }}${UID}{{ else }}1000{{ end }}
    labels:
      - traefik.enable=false
    volumes:
      {{- if eq "true" .EnvFiles.Kickoff.ENABLE_DOCKER_SYNC }}
      - {{ .EnvFiles.Kickoff.ENV }}{{ .Values.Kickoff.project.name }}_sync_app:/var/www/html:nocopy
      {{- else }}
      - ../app:/var/www/html:{{ if eq "darwin" .Os }}cached{{ else }}rw{{ end }}
      {{- end }}
      - ./php-fpm/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh:ro
      - ./php-fpm/conf.d/memory-limit.ini:/usr/local/etc/php/conf.d/memory-limit.ini:ro
      - ./php-fpm/php-fpm.d/memory-limit.conf:/usr/local/etc/php-fpm.d/memory-limit.conf:ro
      - ./php-fpm/php-fpm.d/security.conf:/usr/local/etc/php-fpm.d/security.conf:ro
      - ./php-fpm/php-fpm.d/uploads.conf:/usr/local/etc/php-fpm.d/uploads.conf:ro
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201


  mysql:
    image: mysql:5.7
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-mysql
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    networks:
      - backend
    {{- if eq "true" .EnvFiles.Kickoff.MYSQL_ENABLE_PORTS_MAPPING }}
    ports:
      - "{{ .EnvFiles.Kickoff.MYSQL_HOST_PORT_TO_MAP }}:3306"
    {{- end }}
    environment:
      - MYSQL_USER={{ .Values.Kickoff.mysql.user }}
      - MYSQL_PASSWORD_FILE=/run/secrets/mysql_password
      - MYSQL_ROOT_PASSWORD_FILE=/run/secrets/mysql_root_password
    secrets:
      - mysql_password
      - mysql_root_password
    labels:
      - traefik.enable=false
    volumes:
      - mysql_data:/var/lib/mysql
      - ./mysql/conf.d/utf8mb4.cnf:/etc/mysql/conf.d/utf8mb4.cnf:ro
      - ./mysql/docker-entrypoint-initdb.d/databases.sql:/docker-entrypoint-initdb.d/databases.sql:ro
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201

{{ if eq "local" .EnvFiles.Kickoff.ENV }}
  phpmyadmin:
    image: phpmyadmin/phpmyadmin:4.7
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-phpmyadmin
    restart: "no"
    networks:
      - proxy
      - backend
    environment:
      - PMA_HOST=mysql
      - PMA_USER=root
      - PMA_PASSWORD={{ .EnvFiles.Kickoff.MYSQL_ROOT_PASSWORD }}
    labels:
      - traefik.backend={{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-phpmyadmin
      {{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
      {{- if eq $env $.EnvFiles.Kickoff.ENV }}
      - traefik.frontend.rule=Host:phpadmin.{{ $virtualhost }}
      {{- end }}
      {{- end }}
      - traefik.docker.network=kickoff_proxy
    volumes:
      - phpmyadmin_data:/sessions
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201
{{ end }}

  redis:
    image: redis:3.2-alpine
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-redis
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    command: redis-server --requirepass {{ .EnvFiles.Kickoff.REDIS_PASSWORD }}
    networks:
      - backend
    labels:
      - traefik.enable=false
    volumes:
      - redis_data:/data
    logging:
      driver: gelf
      options:
        gelf-address: udp://localhost:12201


  rabbitmq:
    image: rabbitmq:3.6.10-management-alpine
    container_name: {{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-rabbitmq
    restart: {{ if ne "local" .EnvFiles.Kickoff.ENV }}unless-stopped{{ else }}"no"{{ end }}
    hostname: rabbitmq
    networks:
      - proxy
      - backend
    environment:
      - RABBITMQ_DEFAULT_USER={{ .Values.Kickoff.rabbitmq.user }}
      - RABBITMQ_DEFAULT_PASS={{ .EnvFiles.Kickoff.RABBITMQ_PASSWORD }}
    labels:
      - traefik.backend={{ .EnvFiles.Kickoff.ENV }}-{{ .Values.Kickoff.project.name }}-rabbitmq
      {{- range $env, $virtualhost := .Values.Kickoff.project.virtualhost }}
      {{- if eq $env $.EnvFiles.Kickoff.ENV }}
      - traefik.frontend.rule=Host:rabbitmq.{{ $virtualhost }}
{'fraction_non_alphanumeric': 0.1741478530323152, 'fraction_numerical': 0.009915891987605134, 'mean_word_length': 2.4907292954264526, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 10, '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': '1866966', 'n_tokens_mistral': 4300, 'n_tokens_neox': 4189, 'n_words': 621}