netz39-infra-ansible/roles/cleanuri/tasks/main.yml

79 lines
2.3 KiB
YAML

# Tasks for the cleanuri role
---
- name: Ensure CleanURI WebUI is running
docker_container:
name: cleanuri-webui
image: "{{ cleanuri_image_webui }}"
pull: true
state: started
detach: yes
ports:
- "127.0.0.1:{{ cleanuri_ui_host_port }}:80"
restart_policy: unless-stopped
env:
REACT_APP_API_GATEWAY: "https://{{ cleanuri_api_domain }}"
- name: Setup proxy site for the CleanURI WebUI
include_role:
name: setup-http-site-proxy
vars:
site_name: "{{ cleanuri_ui_domain }}"
proxy_port: "{{ cleanuri_ui_host_port }}"
- name: Ensure CleanURI API Gateway is running
docker_container:
name: cleanuri-apigateway
image: "{{ cleanuri_image_apigateway }}"
pull: true
state: started
detach: yes
ports:
- "127.0.0.1:{{ cleanuri_api_host_port }}:8080"
restart_policy: unless-stopped
env:
AMQP_HOST: "{{ cleanuri_amqp_host }}"
AMQP_USER: "{{ cleanuri_amqp_user }}"
AMQP_PASS: "{{ cleanuri_amqp_pass }}"
AMQP_VHOST: "{{ cleanuri_amqp_vhost }}"
GATEWAY_RESULT_QUEUE: "{{ cleanuri_amqp_results }}"
GATEWAY_TASK_RK: "{{ cleanuri_amqp_canonizer }}"
- name: Ensure CleanURI Canonizer is running
docker_container:
name: cleanuri-canonizer
image: "{{ cleanuri_image_canonizer }}"
pull: true
state: started
detach: yes
restart_policy: unless-stopped
env:
AMQP_HOST: "{{ cleanuri_amqp_host }}"
AMQP_USER: "{{ cleanuri_amqp_user }}"
AMQP_PASS: "{{ cleanuri_amqp_pass }}"
AMQP_VHOST: "{{ cleanuri_amqp_vhost }}"
CANONIZER_TASK_QUEUE: "{{ cleanuri_amqp_canonizer }}"
EXTRACTOR_TASK_RK: "{{ cleanuri_amqp_retrieval }}"
- name: Ensure CleanURI Extractor is running
docker_container:
name: cleanuri-extractor
image: "{{ cleanuri_image_extractor }}"
pull: true
state: started
detach: yes
restart_policy: unless-stopped
env:
AMQP_HOST: "{{ cleanuri_amqp_host }}"
AMQP_USER: "{{ cleanuri_amqp_user }}"
AMQP_PASS: "{{ cleanuri_amqp_pass }}"
AMQP_VHOST: "{{ cleanuri_amqp_vhost }}"
EXTRACTION_TASK_QUEUE: "{{ cleanuri_amqp_retrieval }}"
- name: Setup proxy site the CleanURI API Gateway
include_role:
name: setup-http-site-proxy
vars:
site_name: "{{ cleanuri_api_domain }}"
proxy_port: "{{ cleanuri_api_host_port }}"