<commit_before>include:
  - docker
  - apache-proxy

{% from 'lib.sls' import apache %}
{{ apache('resource-projects.conf') }}

{% set dockers = {
  'virtuoso': 'caprenter/automated-build-virtuoso',
  'ontowiki': 'bjwebb/ontowiki.docker',
  'lodspeakr': 'bjwebb/resourceprojects.org-frontend',
  'etl': 'bjwebb/rp-etl',
} %}

{% for container, repo in dockers.items() %}
{{ repo }}:
  docker.pulled:
    - tag: latest
    - require:
      - sls: docker
    - force: True
    - watch_in:
      - service: docker-{{ container }}
{% endfor %}

{% set container = 'virtuoso' %}
/etc/systemd/system/docker-{{ container }}.service:
  file.managed:
    - source: salt://systemd/docker-run.service
    - template: jinja
    - context:
        image: {{ dockers[container] }}
        name: {{ container }}
        extraargs: -p 127.0.0.1:8890:8890 --volumes-from virtuoso-data<commit_msg>Update lodspeakr and etl to use opendataservices org on docker hub<commit_after>include:
  - docker
  - apache-proxy

{% from 'lib.sls' import apache %}
{{ apache('resource-projects.conf') }}

{% set dockers = {
  'virtuoso': 'caprenter/automated-build-virtuoso',
  'ontowiki': 'bjwebb/ontowiki.docker',
  'lodspeakr': 'opendataservices/resourceprojects.org-frontend:master',
  'etl': 'opendataservices/resource-projects-etl:cove-etl',
} %}

{% for container, repo in dockers.items() %}
{{ repo }}:
  docker.pulled:
    - tag: latest
    - require:
      - sls: docker
    - force: True
    - watch_in:
      - service: docker-{{ container }}
{% endfor %}

{% set container = 'virtuoso' %}
/etc/systemd/system/docker-{{ container }}.service:
  file.managed:
    - source: salt://systemd/docker-run.service
    - template: jinja
    - context:
        image: {{ dockers[container] }}
        name: {{ container }}
        extraargs: -p 127.0.0.1:8890:8890 --volumes-from virtuoso-data
{'fraction_non_alphanumeric': 0.16970998925886144, 'fraction_numerical': 0.015037593984962405, 'mean_word_length': 3.0588235294117645, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '784664', 'n_tokens_mistral': 722, 'n_tokens_neox': 658, 'n_words': 125}