-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
86 lines (67 loc) · 2.55 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
76
77
78
79
80
81
82
83
84
85
SERVER_IP=52.69.164.172
.PHONY: ssh
ssh:
ssh -i ~/.ssh/arayadev-github-action ubuntu@${SERVER_IP}
.PHONY: download-access-log
download-access-log:
scp -r -i ~/.ssh/arayadev-github-action ubuntu@${SERVER_IP}:/logs/access-log ./logs/prod/
.PHONY: upload-nginxconf
upload-nginxconf:
scp -r -i ~/.ssh/arayadev-github-action ./conf/nginx/nginx.conf ubuntu@${SERVER_IP}:/etc/nginx/nginx.conf
scp -r -i ~/.ssh/arayadev-github-action ./conf/nginx/share ubuntu@${SERVER_IP}:/etc/nginx/
.PHONY: upload-scripts
upload-scripts:
scp -r -i ~/.ssh/arayadev-github-action ./scripts/* ubuntu@${SERVER_IP}:/scripts
.PHONY: upload-makefile
upload-makefile:
scp -r -i ~/.ssh/arayadev-github-action ./Makefile ubuntu@${SERVER_IP}:/var/www/araya.dev/
.PHONY: deploy-all
deploy-all:
rsync --exclude "**/node_modules" --delete -r -e "ssh -i ~/.ssh/arayadev-github-action" ./ ubuntu@${SERVER_IP}:/var/www/araya.dev/
.PHONY: deploy-www
deploy-www:
rsync --delete -r -e "ssh -i ~/.ssh/arayadev-github-action" ./www.araya.dev/ ubuntu@${SERVER_IP}:/var/www/araya.dev/www.araya.dev/
.PHONY: deploy-pg
deploy-pg:
rsync --delete -r -e "ssh -i ~/.ssh/arayadev-github-action" ./playground.araya.dev/ ubuntu@${SERVER_IP}:/var/www/araya.dev/playground.araya.dev/
.PHONY: deploy-myip
deploy-myip:
rsync --delete -r -e "ssh -i ~/.ssh/arayadev-github-action" ./myip.araya.dev/myip-araya-dev ubuntu@${SERVER_IP}:/var/www/araya.dev/myip.araya.dev/
.PHONY: dev-blog
blog-dev:
cd blog.araya.dev && yarn run watch &
sudo h2o -c conf/h2o/local/blog.conf
.PHONY: build-blog
blog-build:
cd blog.araya.dev && yarn run build && cd ..
.PHONY: deploy-blog
deploy-blog:
rsync --delete -r -e "ssh -i ~/.ssh/arayadev-github-action" ./blog.araya.dev/dist/ ubuntu@${SERVER_IP}:/var/www/araya.dev/blog.araya.dev/dist
.PHONY: deploy-nevertls
deploy-nevertls:
rsync --delete -r -e "ssh -i ~/.ssh/arayadev-github-action" ./nevertls.araya.dev/ ubuntu@${SERVER_IP}:/var/www/araya.dev/nevertls.araya.dev/
.PHONY: start-dev
start-dev:
docker-compose build && docker-compose up -d
.PHONY: start-prod
start-prod:
sudo nginx
.PHONY: restart-prod
restart-prod:
sudo nginx -s reload
.PHONY: certificate
certificate:
sudo certbot certonly \
--expand \
--webroot \
--webroot-path /var/www/araya.dev/www.araya.dev/ \
-d araya.dev \
-d playground.araya.dev \
-d blog.araya.dev \
--agree-tos \
--non-interactive \
--cert-name araya.dev
.PHONY: build-boringssl
build-boringssl:
docker build -f Dockerfile.boringssl -t boringssl-builder .
docker run --rm -v ${PWD}/lib/boringssl:/etc/boringssl boringssl-builder /scripts/build-boringssl