Frontend deployment

This commit is contained in:
Oleg Lavrovsky 2020-05-16 19:01:32 +02:00
parent d799a05c78
commit 7f2cd5653a
3 changed files with 19 additions and 9 deletions

View File

@ -41,7 +41,7 @@ setup:
rebuild:
docker-compose pull
docker-compose build web --no-cache
docker-compose build web
docker-compose stop web
docker-compose kill web
docker-compose up -d web

View File

@ -1,5 +1,9 @@
---
- name: Create release directory
file: path={{ release_dir }} state=directory owner=ansible group=ansible
become: true
- name: Install JavaScript Yarn
become: true
npm:
@ -30,11 +34,17 @@
yarn:
path: "{{ release_dir }}"
- name: Link the old bower component to libs
- name: Create libs directory
file:
src: "{{ release_dir }}/node_modules/@bower_components"
dest: "{{ release_dir }}/publichealth/static/libs"
state: link
path: "{{ release_dir }}/publichealth/static/libs/"
state: directory
- name: Copy bower components to libs
copy:
src: "{{ release_dir }}/node_modules/@bower_components/"
dest: "{{ release_dir }}/publichealth/static/libs/"
remote_src: yes
force: yes
- name: Compile JavaScript sources with Grunt
shell: grunt

View File

@ -1,13 +1,13 @@
---
- include: install.yaml
tags:
- install
- include: frontend.yaml
tags:
- frontend
- include: install.yaml
tags:
- install
- include: release.yaml
tags:
- release