File tree 3 files changed +27
-11
lines changed
3 files changed +27
-11
lines changed Original file line number Diff line number Diff line change @@ -23,12 +23,15 @@ react_node_version: 10.x
23
23
24
24
# app
25
25
react_remote_js_build : true
26
- react_local_checkout_path : " /tmp/{{ react_local_user }}/reveal"
26
+ react_local_checkout_path : " /tmp/react/{{ ansible_date_time['epoch'] }}"
27
+ react_local_app_path : " {{ react_local_checkout_path }}"
27
28
react_env_name : " prod"
28
29
react_app_name : " {{ react_system_user }}"
29
30
react_codebase_path : " {{ react_system_user_home }}/app"
30
31
react_versioned_path : " {{ react_codebase_path }}-versioned"
32
+ # where the repository is cloned
31
33
react_checkout_path : " {{ react_versioned_path }}/{{ ansible_date_time['epoch'] }}"
34
+ # where the actual app package is
32
35
react_app_path : " {{ react_checkout_path }}"
33
36
react_log_path : " /var/log/{{ react_app_name }}"
34
37
react_max_versioned_folders : 10
Original file line number Diff line number Diff line change 8
8
react_system_group : " www-data"
9
9
react_system_user_home : " /home/{{ react_system_user }}"
10
10
react_node_version : 10.x
11
- react_git_url : " https://github.com/onaio/reveal-frontend "
12
- react_git_version : " v0.6.2-rc1 "
11
+ react_git_url : " https://github.com/OpenSRP/web.git "
12
+ react_git_version : " master "
13
13
react_app_settings :
14
14
GENERATE_SOURCEMAP : " false"
15
15
SKIP_PREFLIGHT_CHECK : " true"
16
16
react_remote_js_build : false
17
+ react_local_app_path : " {{ react_local_checkout_path }}/client"
18
+ react_app_path : " {{ react_checkout_path }}/client"
Original file line number Diff line number Diff line change 4
4
- name : Copy environment variables file locally
5
5
template :
6
6
src : env.j2
7
- dest : " {{ react_local_checkout_path }}/.env"
7
+ dest : " {{ react_local_app_path }}/.env"
8
8
mode : 0644
9
9
delegate_to : localhost
10
10
become : true
27
27
become_user : " {{ react_local_user }}"
28
28
29
29
- name : Remove node_modules before compression
30
- file :
31
- path : " {{ react_local_checkout_path }}/node_modules"
32
- state : absent
33
- delegate_to : localhost
34
- become : true
35
- become_user : " {{ react_local_user }}"
30
+ block :
31
+ - name : Remove node_modules using lerna where possible
32
+ command : yarn lerna clean -y
33
+ args :
34
+ chdir : " {{ react_local_checkout_path }}"
35
+ ignore_errors : true
36
+ delegate_to : localhost
37
+ become : true
38
+ become_user : " {{ react_local_user }}"
39
+
40
+ - name : remove node_modules manually
41
+ file :
42
+ path : " {{ react_checkout_path }}/node_modules"
43
+ state : absent
44
+ delegate_to : localhost
45
+ become : true
46
+ become_user : " {{ react_local_user }}"
36
47
37
48
- name : Compress Build folder locally
38
49
archive :
55
66
- name : Copy environment variables file
56
67
template :
57
68
src : env.j2
58
- dest : " {{ react_checkout_path }}/.env"
69
+ dest : " {{ react_app_path }}/.env"
59
70
mode : 0644
60
71
61
72
- name : Install Javascript requirements
You can’t perform that action at this time.
0 commit comments