summaryrefslogtreecommitdiffhomepage
path: root/Makefile
blob: ce0c997e42b01da588ac3ca51ef187d2e10e711d (plain)
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
.PHONY: all
all: deploy

.PHONY: deploy
deploy: build serve

.PHONY: setup
setup: .nsfisis_dev_shared_network certbot
	cd vhosts/blog; make setup

.PHONY: build
build:
	docker-compose build
	cd vhosts/blog; make build

.PHONY: serve
serve: .nsfisis_dev_shared_network
	docker-compose up -d
	cd vhosts/blog; make serve

.PHONY: clean
clean:
	cd vhosts/blog; make clean
	docker-compose down
	docker network ls | grep nsfisis_dev_shared > /dev/null && docker network rm nsfisis_dev_shared

.PHONY: .nsfisis_dev_shared_network
.nsfisis_dev_shared_network:
	docker network ls | grep nsfisis_dev_shared > /dev/null || docker network create nsfisis_dev_shared

.PHONY: certbot
certbot:
	docker-compose run --rm --entrypoint 'certbot certonly --register-unsafely-without-email --webroot -w /var/letsencrypt/www -d nsfisis.dev,blog.nsfisis.dev,www.nsfisis.dev' certbot