<commit_before># For a live deploy, please follow the instructions at https://cove.readthedocs.io/en/latest/deployment/
{% from 'lib.sls' import createuser, apache, uwsgi, removeapache, removeuwsgi %}

{% set user = 'cove' %}
{{ createuser(user) }}

{% set giturl = 'https://github.com/OpenDataServices/cove.git' %}

# libapache2-mod-wsgi-py3
# gettext

include:
  - core
  - apache
  - uwsgi
{% if 'https' in pillar.cove %}  - letsencrypt{% endif %}

cove-deps:
    apache_module.enabled:
      - name: proxy proxy_uwsgi
      - watch_in:
        - service: apache2
    pkg.installed:
      - pkgs:
        - libapache2-mod-proxy-uwsgi
        {% if grains['osrelease'] == '18.04' or grains['osrelease'] == '16.04' %}
        - python-pip
        - python-virtualenv
        {% endif %}
        {% if grains['osrelease'] == '20.04' %}
        - python3-pip
        - python3-virtualenv
        - gcc
        - libxslt1-dev
        {% endif %}
        - uwsgi-plugin-python3
        - gettext
          {% if 'iati' in pillar.cove and pillar.cove.iati %}
        - python3-dev
          {% endif %}
      - watch_in:
        - service: apache2
        - service: uwsgi

remoteip:
    apache_module.enabled:
      - watch_in:
        - service: apache2

{% macro cove(name, giturl, branch, djangodir, user, uwsgi_port, servername=None, schema_url_ocds=None, app='cove', assets_base_url='') %}


{% set extracontext %}<commit_msg>cove: python3-dev is needed for 18.04 deploys of cove (currently bods)<commit_after># For a live deploy, please follow the instructions at https://cove.readthedocs.io/en/latest/deployment/
{% from 'lib.sls' import createuser, apache, uwsgi, removeapache, removeuwsgi %}

{% set user = 'cove' %}
{{ createuser(user) }}

{% set giturl = 'https://github.com/OpenDataServices/cove.git' %}

# libapache2-mod-wsgi-py3
# gettext

include:
  - core
  - apache
  - uwsgi
{% if 'https' in pillar.cove %}  - letsencrypt{% endif %}

cove-deps:
    apache_module.enabled:
      - name: proxy proxy_uwsgi
      - watch_in:
        - service: apache2
    pkg.installed:
      - pkgs:
        - libapache2-mod-proxy-uwsgi
        {% if grains['osrelease'] == '18.04' or grains['osrelease'] == '16.04' %}
        - python-pip
        - python-virtualenv
        {% endif %}
        {% if grains['osrelease'] == '20.04' %}
        - python3-pip
        - python3-virtualenv
        - gcc
        - libxslt1-dev
        {% endif %}
        - uwsgi-plugin-python3
        - gettext
          {% if grains['osrelease'] == '18.04' or ('iati' in pillar.cove and pillar.cove.iati) %}
        - python3-dev
          {% endif %}
      - watch_in:
        - service: apache2
        - service: uwsgi

remoteip:
    apache_module.enabled:
      - watch_in:
        - service: apache2

{% macro cove(name, giturl, branch, djangodir, user, uwsgi_port, servername=None, schema_url_ocds=None, app='cove', assets_base_url='') %}


{% set extracontext %}
{'fraction_non_alphanumeric': 0.14377755171244488, 'fraction_numerical': 0.01865038996269922, 'mean_word_length': 2.285077951002227, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '174415', 'n_tokens_mistral': 1138, 'n_tokens_neox': 1010, 'n_words': 211}