forked from avni-bahmni-integration/admin-web-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
executable file
·75 lines (56 loc) · 1.86 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
define _alert_success
$(call _alert_message,Script Completed)
endef
start:
PORT=6014 yarn start
test:
yarn test
deps:
yarn install
build-app:
yarn run build
web_app_dir := /var/www/avni-int-service
tmp_web_app_dir := /tmp/avni-int-service
_zip-app:
cp ./env-templates/$(template) .env
yarn run build
tar -czvf avni-int-admin-app.tgz -C build .
cp ./env-templates/local-apache.template .env
_zip-app-only:
cp ./env-templates/$(template) .env
tar -czvf avni-int-admin-app.tgz -C build .
cp ./env-templates/local-apache.template .env
zip-app-prod:
make _zip-app template=prod.template
zip-app-staging:
make _zip-app template=staging.template
zip-app-rwb-staging:
make _zip-app template=rwb-staging.template
zip-app-rwb-prod:
make _zip-app template=rwb-prod.template
zip-app-only-prod:
make _zip-app-only template=prod.template
zip-app-only-staging:
make _zip-app-only template=staging.template
zip-app-only-rwb-prod:
make _zip-app-only template=rwb-prod.template
zip-app-only-rwb-staging:
make _zip-app-only template=rwb-staging.template
foo:
$(call _remote_ashwini_command,"echo hello")
deploy-vagrant:
cp ./env-templates/$(template) .env
yarn run build
echo vagrant | pbcopy
ssh -p 2222 -i ~/.vagrant.d/insecure_private_key root@127.0.0.1 "rm -rf $(web_app_dir)"
ssh -p 2222 -i ~/.vagrant.d/insecure_private_key root@127.0.0.1 "mkdir $(web_app_dir)"
scp -r -P 2222 -i ~/.vagrant.d/insecure_private_key build/* root@127.0.0.1:$(web_app_dir)
ssh -p 2222 -i ~/.vagrant.d/insecure_private_key root@127.0.0.1 "chmod -R 755 $(web_app_dir)"
ssh -p 2222 -i ~/.vagrant.d/insecure_private_key root@127.0.0.1 "chown -R bahmni:bahmni $(web_app_dir)"
local_web_app_dir := /var/www/avni-int-service
deploy-local:
rm -rf $(local_web_app_dir)
mkdir -p $(local_web_app_dir)
cp ./env-templates/local-apache.template .env
yarn run build
cp -r build/* $(local_web_app_dir)/