-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
44 lines (32 loc) · 1.27 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
include .env
export $(shell sed 's/=.*//' .env)
default: build
build-prepare:
@echo "Prepare Build System"
@docker buildx create --name mybuilder --driver docker-container --bootstrap
@docker buildx use mybuilder
@docker buildx inspect
build-lb:
@echo "Building Load Balancer"
@docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 ./images/nginx -t ${REGISTRY}/nginx:latest --push
@docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 ./images/dockergen -t ${REGISTRY}/dockergen:latest --push
build-dns:
@echo "Building DNS"
@docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64 ./images/dnsmasq -t ${REGISTRY}/dnsmasq:latest --push
build: build-lb build-dns
deploy-lb:
@echo "Deploying Load Balancer with Let's Encrypt"
@docker-compose -f ./docker-compose.yml -f ./docker-compose-letsencrypt.yml up -d
deploy-dns:
@echo "Deploying DNS"
@docker-compose -f docker-compose-dnsmasq.yml up -d
sh ./bin/dns-mac.sh
deploy-nginx:
@echo "Deploying Local Stack"
@docker-compose -f docker-compose.yml up -d
deploy-local: deploy-nginx deploy-dns
deploy: deploy-lb
clean:
@echo "Cleaning"
@docker-compose -f docker-compose.yml -f docker-compose-letsencrypt.yml -f docker-compose-dnsmasq.yml down -v --remove-orphans
.PHONY: build deploy