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: rebuild:
docker-compose pull docker-compose pull
docker-compose build web --no-cache docker-compose build web
docker-compose stop web docker-compose stop web
docker-compose kill web docker-compose kill web
docker-compose up -d 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 - name: Install JavaScript Yarn
become: true become: true
npm: npm:
@ -30,11 +34,17 @@
yarn: yarn:
path: "{{ release_dir }}" path: "{{ release_dir }}"
- name: Link the old bower component to libs - name: Create libs directory
file: file:
src: "{{ release_dir }}/node_modules/@bower_components" path: "{{ release_dir }}/publichealth/static/libs/"
dest: "{{ release_dir }}/publichealth/static/libs" state: directory
state: link
- 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 - name: Compile JavaScript sources with Grunt
shell: grunt shell: grunt

View file

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