-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 910 Bytes
/
Makefile
File metadata and controls
33 lines (26 loc) · 910 Bytes
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
up:
docker-compose up --build -d
down:
docker-compose down
restart:
docker-compose restart
logs:
docker-compose logs -f
shell:
docker exec -ti nginx-https-proxy bash
cert: up
@if [ -z "$$domain" ]; then echo "Usage: make cert domain=[your domain name]"; exit 1; fi
docker exec -ti nginx-https-proxy certbot certonly --nginx --no-redirect -d $$domain
self-signed-cert:
@if [ -z "$$domain" ]; then echo "Usage: make self-signed-cert domain=[your domain name]"; exit 1; fi
@if [ "$$USER" != "root" ]; then echo "Error: Must be run as root."; exit 1; fi
mkdir -p ./letsencrypt/live/$$domain/
openssl req -x509 -newkey rsa:4096 \
-subj "/CN=$$domain" \
-out ./letsencrypt/live/$$domain/fullchain.pem \
-keyout ./letsencrypt/live/$$domain/privkey.pem \
-days 365 \
-nodes
clean: down
@if [ "$$USER" != "root" ]; then echo "Error: Must be run as root."; exit 1; fi
rm -rf ./letsencrypt/