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
Branches
No related tags found
No related merge requests found
...@@ -4,3 +4,15 @@ ...@@ -4,3 +4,15 @@
service: service:
name: uwsgi name: uwsgi
state: restarted 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 @@ ...@@ -31,19 +31,24 @@
- /var/www/alerta - /var/www/alerta
- /tmp/angular-alerta-webui-master - /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 #- name: Download and extract web UI
unarchive: # unarchive:
src: 'https://github.com/alerta/angular-alerta-webui/archive/v{{ alerta_ui_version }}.zip' # src: 'https://github.com/alerta/angular-alerta-webui/archive/v{{ alerta_ui_version }}.zip'
dest: /tmp # dest: /tmp
remote_src: yes # remote_src: yes
- name: Move new web UI #- name: Move new web UI
command: mv /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app /var/www/alerta # command: mv /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app /var/www/alerta
args: # args:
creates: /var/www/alerta # creates: /var/www/alerta
removes: /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app # removes: /tmp/angular-alerta-webui-{{ alerta_ui_version }}/app
- name: Copy wsgi.py - name: Copy wsgi.py
template: template:
...@@ -131,3 +136,13 @@ ...@@ -131,3 +136,13 @@
copy: copy:
src: '{{ inventory_dir }}/files/favicon.ico' src: '{{ inventory_dir }}/files/favicon.ico'
dest: /var/www/alerta/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.
Please register or to comment