-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
31 lines (22 loc) · 1.63 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
# Reference Sites:
# https://www.dinotools.de/en/2019/12/23/use-python-with-virtualenv-in-makefiles/
# https://earthly.dev/blog/python-makefile/
# https://ljvmiranda921.github.io/notebook/2021/05/12/how-to-manage-python-envs/
# Misc
.DEFAULT_GOAL=help
## ———————————————— General Let's Encrypt Automations 🖖 ————————————————
help: ## Outputs this help screen.
@grep -E '(^[a-zA-Z0-9_-]+:.*?##.*$$)|(^##)' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}{printf "\033[32m%-30s\033[0m %s\n", $$1, $$2}' | sed -e 's/\[32m##/[33m/'
setup: ## This will setup the project (Remember to configure your .env file first.)
@docker build . --tag certbot-ssl
@docker run -it --rm -v .:/app -t certbot-ssl --cf-setup
nodebalancer-discover: ## This will discover NodeBalancers on the Linode account the Linode API key was setup for.nodebalancer
@docker run -it --rm -v .:/app -t certbot-ssl --nodebalancer-discover
certbot-new: setup ## This will issue a new certificate or setup the Let's Encrypt environment with the current certificate.
@docker run -it --rm -v .:/app -t certbot-ssl --new-certificate | /bin/sh 2> /dev/null
certbot-renew: setup ## This will attempt to renew the Let's Encrypt certificate.
@docker run -it --rm -v .:/app -t certbot-ssl --renew-certificate | /bin/sh 2> /dev/null
linode-update: ## This updates the Linode NodeBalancer with the current available certificate.
@docker run -it --rm -v .:/app -t certbot-ssl --update-nodebalancer
test-python-image: ## This will test the Python image by running the main.py test method.
@docker run -it --rm -v .:/app -t certbot-ssl -t