Skip to content
Snippets Groups Projects
Commit a7f84f7e authored by jurgenhaas's avatar jurgenhaas
Browse files

Run the ui through docker and provide an update task

parent 8ab6490c
No related branches found
No related tags found
No related merge requests found
......@@ -4,3 +4,15 @@
service:
name: uwsgi
state: restarted
- name: Re-create the alerta ui container
docker_container:
name: alerta-beta
image: alerta/alerta-beta
state: started
recreate: yes
restart_policy: always
published_ports:
- 8999:80
volumes:
- /var/www/alerta/config.json:/usr/share/nginx/html/config.json
......@@ -31,19 +31,24 @@
- /var/www/alerta
- /tmp/angular-alerta-webui-master
# docker run -d -v "/var/www/alerta/config.json:/usr/share/nginx/html/config.json" --restart=always -it -p 8999:80 --name alerta-beta alerta/alerta-beta
- name: Ensure directory for web UI
file:
path: '{{ item }}'
state: absent
with_items:
- /var/www/alerta
- name: Download and extract web UI
unarchive:
src: 'https://github.com/alerta/angular-alerta-webui/archive/v{{ alerta_ui_version }}.zip'
dest: /tmp
remote_src: yes
#- name: Download and extract web UI
# unarchive:
# src: 'https://github.com/alerta/angular-alerta-webui/archive/v{{ alerta_ui_version }}.zip'
# dest: /tmp
# remote_src: yes
- name: Move new web UI
command: mv /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app /var/www/alerta
args:
creates: /var/www/alerta
removes: /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app
#- name: Move new web UI
# command: mv /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app /var/www/alerta
# args:
# creates: /var/www/alerta
# removes: /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app
- name: Copy wsgi.py
template:
......@@ -131,3 +136,13 @@
copy:
src: '{{ inventory_dir }}/files/favicon.ico'
dest: /var/www/alerta/favicon.ico
- name: Pull docker image
docker_image:
name: alerta/alerta-beta
source: pull
force_source: yes
notify:
- Re-create the alerta ui container
tags:
- ui
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment