-
Notifications
You must be signed in to change notification settings - Fork 5
/
Makefile
31 lines (25 loc) · 1.05 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
INSTALL_PATH=/etc/tls-proxy
all: docker
docker:
docker build -f docker/nginx/Dockerfile -t probely/nginx docker/nginx
docker build -f docker/tls-controller/Dockerfile -t probely/tls-controller docker/tls-controller
docker-push: docker
docker push probely/nginx:latest
docker push probely/tls-controller:latest
install:
mkdir -p $(INSTALL_PATH)
chmod 0700 $(INSTALL_PATH)
grep ^export deployments/stand-alone/*.env | cut -d ' ' -f 2- > $(INSTALL_PATH)/system.env
cp deployments/stand-alone/docker-compose.yml $(INSTALL_PATH)/
cp systemd/* /etc/systemd/system
systemctl enable tls-proxy tls-proxy-controller.timer
systemctl start tls-proxy tls-proxy-controller.timer
uninstall:
systemctl disable tls-proxy tls-proxy-controller.timer 2>/dev/null|| true
systemctl stop tls-proxy tls-proxy-controller.timer 2>/dev/null|| true
pushd $(INSTALL_PATH) 2>/dev/null|| true
docker-compose down 2>/dev/null|| true
popd 2>/dev/null|| true
rm /etc/systemd/system/tls-proxy* 2>/dev/null || true
rm -rf $(INSTALL_PATH)
.PHONY: all docker install uninstall docker-push